Average if based on month date

psrs0810

Well-known Member
Joined
Apr 14, 2009
Messages
1,109
I need to take an average of some trended data and I want the average to update based on a selected date.
So if the month listed is May, I need to be able average the months July - May. If that changes to June, I want the average to automatically change and average from July-June.
how do I set this up?
Thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
You could use AVERAGEIFS functions to average between range of dates as specified and demonstrated below.

Enter start month in B2
No of months for average in B3
and EOMONTH(B2,B3-1) in B4

Then you could refer B2 and (">="&B2) and B4 ("<="&B4") in AVERAGEIFS function.


1625349276594.png


Kind regards

Saba
 
Upvote 0

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top