Dynamic averaging of a selectable date range

zzzjtwzzz

New Member
Joined
Mar 12, 2017
Messages
1
How do I setup a formula to calculate the average of a set of investments based on a selectable (Start Date and End Date) date range?


Invest1Invest2Invest3Invest4Invest5Start DateEnd Date
Mth11.401.571.571.621.55Mth3Mth6
Mth21.291.721.711.731.71Invest1Avg Mth3-Mth6
Mth3-1.86-1.94-1.94-1.94-1.93Invest2Avg Mth3-Mth6
Mth40.870.910.850.890.88Invest3Avg Mth3-Mth6
Mth50.680.720.720.700.76Invest4Avg Mth3-Mth6
Mth63.864.114.174.184.15Invest5Avg Mth3-Mth6
Mth7-0.42-0.61-0.61-0.66-0.65
Mth80.931.011.021.021.05
Mth91.331.431.361.391.38
Mth106.386.756.816.846.78
Mth11-0.74-0.79-0.79-0.84-0.83
Mth12-5.30-5.96-5.95-5.92-5.94

<tbody>
</tbody>
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
ABCDEFGHI
1 Invest1Invest2Invest3Invest4Invest5Start DateEnd Date
2Mth11.41.571.571.621.55Mth3Mth6
3Mth21.291.721.711.731.71Invest10.8875
4Mth3-1.86-1.94-1.94-1.94-1.93Invest20.95
5Mth4.87.91.85.89.88Invest30.95
6Mth5.680.720.720.70.76Invest40.9575
7Mth63.864.114.174.184.15Invest50.965
8Mth7-0.42-0.61-0.61-0.66-.65
9Mth80.931.011.021.021.05
10Mth91.331.431.361.391.38
11Mth106.386.756.816.846.78
12Mth11-0.74-0.79-0.79-0.84-0.83
13Mth12-5.3-5.96-5.95-5.92-5.94

<tbody>
</tbody>

In I3 and copy down
Code:
=AVERAGE(INDEX($B$2:$F$13,MATCH($H$2,$A$2:$A$13,0),MATCH($H3,$B$1:$F$1,0)):INDEX($B$2:$F$13,MATCH($I$2,$A$2:$A$13,0),MATCH($H3,$B$1:$F$1,0)))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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