I would like to consolidates data in a table per day to a table per week.
I have an input table with all the days of the year in columns and all operators in rows. If an operator plans a holiday, we put a "H" on that day.
I'd like to have an output table with all weeks in rows and all operators in columns where I want to count the number of holidays an operator takes in a week.
Copy your data and Paste Special, Transpose into B1 of a new sheet. In A2 and copied down to suit:
=WEEKNUM(B2)
Select your data (entire columns would serve) and DATA, Outline, Subtotal, At each change in: (ColumnA), Use function: Count, Add subtotal to: tick each operator, OK.
Related
I have the following data in Excel sheet1.
I would like to transpose this data into columns in another sheet. I have used the following formula to do so
=TRANSPOSE(Sheet1!C3:J3)
Which gives the following output
As you can see, the first sheet is frequenced quarterly and the second sheet is frequenced monthly. When I transpose the data into the monthly sheet, is there a way to tweak this formula to have the same number appear in all three months of a given quarter? (so for 0.83 to appear in the first three months, 2.23 in the next three months and so on?)
You can benefit from INDEX and MATCH (Match will work only if headers in transposed data is exactly the same than source data):
Formula in B11:
=INDEX($C$3:$F$4;MATCH(B$10;$B$3:$B$4;0);ROUNDUP(MONTH($A11)/3;0))
Drag to left and down
I`m trying to work out a formula, on how to get the MAX amount, for any 30 day consumption period, for a certain item, when all the criteria are in one data table. See picture below. Date is in column A.
I have table with a formula where I copy and paste data manually
=SUM(IF([Date]>[#Date]-30,IF([Date]<=[#Date],[Amount])))
At the end- I would like to have the list of all the item numbers in one column and the one next to it should have - max amount used in any 30 day period.
In my Master file I have around 1300 Item numbers, which is time-consuming to get the MAX data on-by-one.
Can anyone help?
Instead of copy and paste, you can do a pivot table on the data in the first screenshot. Use the dates in rows, use the Amount in values. If you want to do this for item numbers, use them in rows before the date.
You should then have a nice table with dates and amounts per date, no duplicate dates.
If you don't want to use pivot tables, create the date column manually, without duplicates, and use a Sumifs formula to sum the data from the original sheet. Enter the start date, then use the fill handle and drag down. That will automatically increment the date. Let's say the dates are in column A, first row has labels, then use in B2 and copy down:
=sumifs('the other sheet'!H:H,'the other sheet'!A:A,A2)
Next, in C2 you can use a MAXIFS function along the lines of
=MAXIFS(B:B,A:A,"<="&A2-30)
In the following table I have weeks as columns, employees as rows and the values are the amount of holiday days per employee per week taken.
I want to create a separate table as a dashboard where the output will change depending on the date I input into the date selector. In the example below, I have chosen the 2/11/2015 as my week and I would like to only see the corresponding values for that week in the output table. How do I go about doing this?
Try this in B5:
=Index($B$34:$F$48,MATCH($A5,$A$34:$A$48,0),MATCH($C$1,$B$33:$F$33,0))
Then copy down.
Change the F column References in the formula to get the extent of you columns of data.
As a Note: If you are in a country that use ; as the delimiter between criteria instead of , here is the formula with those delimiters:
=Index($B$34:$F$48;MATCH($A5;$A$34:$A$48;0);MATCH($C$1;$B$33:$F$33;0))
I have tried this, but I am unsuccessful. I have the data dump in an excel sheet (Excel 2010). The first column has month. The second has the dates. The third column has numerical data. I have applied filters on each column to get the data on the Pivot Table. There are entries for each date. There are sometimes multiple entries for a single date. Now, when I run the Pivot, I get the proper sum, but when I select average, the average is accurate only for the single entries associated with a date. I need to calculate average of multiple data entries for a single date. Here is an example:
November 11/1/13 30
November 11/2/13 25
November 11/3/13 20
November 11/3/13 25
Now, when I run the Pivot table and select to average the data, it calculates the average as (30+25+20+25)/4 = 20 (since there are 4 entries, so the sum gets divided by 4).
This is not desirable.
I require the calculation to be made as taking the 3rd and 4th entry as one for the date 11/3/13. So, the required output is (30+25+(20+25))/3 = 33.33.
I hope the example gives an clear idea of the requirement. I need a solution for this. How do we modify the Pivot so that the average is calculated not based on just the number of entries, but the average is calculated for the number of days.
Create the pivot table described by Ron (with Sum only, not Average), then copy & paste special (values) this pivot table, then pivot that for averages.
Put your dates in the "Row Labels" area. It will Sum and Average by Date
Edit: To get the average of the sum of the daily values, you can either enter an Average formula someplace for the Pivot Table Sum Column, or you could use the following array-entered formula:
=SUM(Values)/SUM(1/COUNTIF(Dates,Dates))
Where Dates is the range where you have your list of Dates (on the original data sheet) and Values is the range where you have your original list of Values.
To array-enter a formula, after entering
the formula into the cell or formula bar, hold down
while hitting . If you did this
correctly, Excel will place braces {...} around the formula.
SUM(1/COUNTIF(Dates,Dates)) will return a count of the Unique dates, so it will return 3 for the dates in question in your example.
This proposed solution uses a working column named: Value (U)
Assuming that your data is located at [B4:B8].
Add a working column at [E4:E8]
Enter this formula at [E5:E8]:
= IF( COUNTIF($C$5:$C5,$C5) > 1, 0,
SUMIF($C$5:$C$8,$C5,$D$5:$D$8) )
Then use the working column Value (U) to sum and average the values, also add Value (U) as Page Field to filter out the Value (U)=0.
I have a set of rows in Excel which contain data for a particular month. The month is identified by a column called 'Month' and the data in this column is in the format mm/yyyy.
Now, I would like to duplicate these records vertically for each of the next 11 months, and each time it is duplicated, the month rows should change for that month (e.g. the second time it is duplicated, the month rows should show February and then the next time March, etc.).
What's the best way to do this apart from copy and pasting 11 times and manually changing the months?
The OFFSET approach needs only two formulas copied over to a new sheet to set up the extended data set
This sample assumes
your current sheet is called sheet1
your month data mm/yyyy starts in row 2, and is in column A
Changing the sheet name and column in the two formulas below is easy, if your data to extract started on row 3 not row 2 then change all ROW()-2) to ROW()-3) etc
While the first looks messier than it really is (to add 1 month), the concept is straightforward. The OFFSET approach moves down one cell from Sheet 1 only every 12 rows, the month being tweaked each cell
In A2 put, =DATE(YEAR(OFFSET(Sheet1!A$2,INT((ROW()-2)/12),0)),MONTH(OFFSET(Sheet1!A$2,INT((ROW()-2)/12),0))+MOD(ROW()-2,12),DAY(OFFSET(Sheet1!A$2,INT((ROW()-2)/12),0)))
In B2 put, =OFFSET(Sheet1!B$2,INT((ROW()-2)/12),0) and copy over as far as you have fields
Surprisingly enough, Excel 2007 (only one I have available) understands mm/yyyy as a date, so the formula =TEXT(DATE(YEAR(A2),MONTH(A2)+1,1),"mm/yyyy") creates the next date, and can be copied down.
Duplicating other data would simply be a case of putting the values as =B2 and so forth