I have an excel document with values for every hour for every day of a year.
In total there are 365*24=8760 values.
I would like to get the average value at every hour, (etc at 00:00, 01:00, 02:00..)
I was thinking maybe to sum every 24th value and then divide it by 365 but I don't know how to sum every 24th value.
Does anyone know how to do that?
Thanks for any help!
The clearer way of doing it is using a column to get the hour of each data point and adding a AVERAGEIF formula to calculate the average of every hour.
I am assuming your date/time is on A2:A8761 and the values on B2:B8761.
On C2, add the formula =HOUR(A2) and drag it down to find the hour of every data observation (for newer excel versions you can also
do =HOUR(A2:A8761) and the formula will automatically spill down). The results are numbers from 0 to 23.
Building the summary table:
Add a column listing the numbers 0 to 23 to represent the 24 hours. I did it on column E2:E25. Note that those are numbers, not date/time.
On F2, add the formula =AVERAGEIF($C$2:$C$8761,E2,$B$2:$B$8761) to calculate the average of the hours listed on column E. Then, drag it down. Finally, you will have the values you need on F2:F25.
Find bellow my result.
Please let me know if you have any question so I can improve the answer.
I'm trying to find a formula that could help me with the sum I'm trying to do.
I have a file with differents amounts received at different period that need to be accrued on 13 period and next to that I have a column with a year to that of what is collected.
Exemple in P1 I received 15 000$ which is 1 154$ monthly. Next period I have a additional amount of 200 000$ divided by 13 amount to 15 385$ for a new YTD P2 at 17 693.
The formula I used looks like this for Period 2:
=E3*B4+D4
Period 3 looks like this:
=$E$3*$B5+$D$4*(B5-$B$4)+D5
Period 4 looks like this:
=$E$3*$B6+$D$4*(B6-$B$4+1)+$D$5*(B6-$B$5+1)+D6
And I added to the formula like this until my P13. Is there any other way this could be done ? You can find below an example of the formulas on multiple line:
Link to example file
Thank you!
I think your math is a little off (even though your year end totals are correct).
This is my suggestion:
Add in a column between Monthly and YTD for Monthly Collections. The formula in that column will be =D3 in the first used cell, and then drag down =E3+D4 and so on til the end of the list.
Then in the YTD column put =E3 in the first used cell, and then drag down =F3+E4 and so on til the end of the list.
This should help you eliminate the long manual formulas.
Morning all,
Let me explain my predicament! I'm putting together a set of reporting figures for my employer based on a spreadsheet containing work that's been completed so far this year. I need to report on the total volume of work completed and the average turnaround for this work, split by Week to Date, Month to Date, and Year to Date (WTD, MTD, YTD).
This is something i've put together manually so far but i want to produce a formula which allows my employer to generate his own figures based on a week-ending date he can pick from a dropdown list (held in cell D4).
So far i've been able to generate the below COUNTIF formula to give me the WTD figures for work volumes completed within 7 days of the week ending date in cell D4 (with the completion date being held in 'Completed!O:O'):
=COUNTIFS(Completed!$O:$O,">="&D4-6,Completed!$O:$O,"<="&D4+1)
I'm also using the below AVERAGEIF formula to show the average turnaround (the Turnaround figure is held in 'Completed!P:P'):
=AVERAGEIFS(Completed!$P:$P,Completed!$O:$O,">="&D4-6,Completed!$O:$O,"<="&D4+1)
I've been trying to come up with similar formulas to tell me the MTD and YTD figures but with no success. I originally had the MTD formula return the value based on work completed within 31 days of the Week-Ending date but this was incorrect. If the week-ending date of 03/02/2017 if selected then i only need it to show the count of work completed between the 1st and 3rd of Feb. I'm sure once i work this one out that i'll be able to use a similar formula to show me YTD figures.
Any help or guidance you can offer is appreciated! Cheers.
For the MTD count, use:
=COUNTIFS(Completed!$O:$O,">="&DATE(YEAR(D4),MONTH(D4),1),Completed!$O:$O,"<="&D4+1)
For the YTD count, use:
=COUNTIFS(Completed!$O:$O,">="&DATE(YEAR(D4),1,1),Completed!$O:$O,"<="&D4+1)
For the MTD average, use:
=AVERAGEIFS(Completed!$P:$P,Completed!$O:$O,">="&DATE(YEAR(D4),MONTH(D4),1),Completed!$O:$O,"<="&D4+1)
For the YTD average, use:
=AVERAGEIFS(Completed!$P:$P,Completed!$O:$O,">="&DATE(YEAR(D4),1,1),Completed!$O:$O,"<="&D4+1)
a fellow helpful user has assisted and i now have formulas that work.
For MTD, i'm using the following:
=COUNTIFS(Completed!$O:$O,">="&EOMONTH(D4,-1)+1,Completed!$O:$O,"<="&D4+1)
And for YTD:
=COUNTIFS(Completed!$O:$O,">="&DATE(YEAR(D4),1,1),Completed!$O:$O,"<="&D4+1)
Thanks for everyones help!
I have some data that I want to calculate the moving average of over a year's time. If the data was always sampled at the same rate and there were the same number of cells included each time, I could just use the offset function, but this is not the case. I currently am just using the average funcntion and changing the cells as I insert a new row. I would like to be able to reference the dates on the left in order to find the average of the data points that are in the last year without having to change the cells referenced in the equation every time. I would need to do something similar in an 80% confidence interval equation I have. Unfortunately I have just created a stack overflow account, as I usually can find an answer online somewhere, so I do not have enough rep to add a picture. Any help is much appreciated!
It sounds like you need a conditional average where:
Start date is greater than the date 1 year prior to date
End date is equal to date
Assuming dates in column A and values in column B then you can use the AVERAGEIFS function as follows:
=AVERAGEIFS($B:$B,$A:$A,">"&EDATE(A250,-12),$A:$A,"<="&A250)
EDATE(Date, Months) returns the date that is Months before or after Date.
I have a figure which is 2880 in cell A1 lets say it's a monthly salary and in this example there are 31 days in the month.
What I want to work out is what would be the weekly average of this figure. Considering it is just over 4 whole weeks - I can't divide by 4 as that's not accurate but then I can't divide by 5 either for the same reason.
So what I need is a calculation which can give me an exact weekly average - is this it all possible or am I trying to complicate matters?
Thanks
Dan
You can use the following formula where cell C2 is the number of the month (March would be 3):
=ROUND(C3/(DATE(1,C2+1,1)-DATE(1,C2,1))*7,2)
See screenshot of the example: