Average a Range of Data by Finding a Starting Month

seasea123

New Member
Joined
Dec 11, 2023
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Can you please help build a formula in column AA? We would like the formula to average the 3 months prior to the month of change. In this case the month of change is Oct 23, so it should average Sep 23, Aug 23 and Jul 23. We'd like the formula to be dynamic for different months of change.

1702336088170.png
 
That's because the values in row 1 are still text & not dates.
Try
Fluff.xlsm
TUVWXYZAA
1Name01/07/202301/08/202309/01/202310/01/202311/01/2023Month of ChangeBaseline (3 Month Avg. Prior to Change)
2Smith, Bob3226273230Oct-2329.8
3Evans, Janet3023322240Nov-2331.3
Sheet6
Cell Formulas
RangeFormula
AA2:AA3AA2=AVERAGE(TAKE(FILTER(U2:Y2,DATEVALUE($U$1:$Y$1)<Z2),,-3))
I think this is closer but still having trouble converting the dates. They are showing as a date, not text but they are not showing up the same way yours are.

Mr Excel.xlsx
TUVWXYZAA
1Name7/1/20238/1/20239/1/202310/1/202311/1/2023Month of Change
2Smith, Bob322627323010/1/202330
3Evans, Janet302332224011/1/202331
Sheet1
Cell Formulas
RangeFormula
AA2:AA3AA2=AVERAGE(TAKE(FILTER(U2:Y2,DATEVALUE($U$1:$Y$1)<Z2),,-3))
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You have now got text in col Z rather than dates.
 
Upvote 0
I think this is closer but still having trouble converting the dates. They are showing as a date, not text but they are not showing up the same way yours are.

Mr Excel.xlsx
TUVWXYZAA
1Name7/1/20238/1/20239/1/202310/1/202311/1/2023Month of Change
2Smith, Bob322627323010/1/202330
3Evans, Janet302332224011/1/202331
Sheet1
Cell Formulas
RangeFormula
AA2:AA3AA2=AVERAGE(TAKE(FILTER(U2:Y2,DATEVALUE($U$1:$Y$1)<Z2),,-3))
Thank you! This worked.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,325
Members
449,154
Latest member
pollardxlsm

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