Formula to use different array based on selected month

BigDelGooner

Board Regular
Joined
Aug 17, 2009
Messages
197
Please help someone!!

I have a sheet where I would like to calculate the 12m standard deviation of a given set of figures based on the month selected (i.e. 12 months to 30/09/09 or 31/10/09).

I know the basic formula for what I am trying to do is =STDEV(Data!X63:X74) for the 12 months to 30/09/09 but what can I add to make this formula dynamically change the range to =STDEV(Data!X64:X75) for the 12 months to 31/10/09.

All of the data is in a named range called 'Data_Range' with the EOMONTHs in the first column which I was hoping might work as a reference for this formula.

Any ideas guys?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Of course....

If the date is in A1 and the data is in column 2 of the range:

=STDEV(OFFSET(Data_Range,MATCH(A1,INDEX(Data_Range,,1))-12,1,12,1))

or using the non-volatile INDEX:

=STDEV(INDEX(Data_Range,MATCH(A1,INDEX(Data_Range,,1))-11,2):INDEX(Data_Range,MATCH(A1,INDEX(Data_Range,,1)),2))
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

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