YTD and Period Averages? Possible averageif with index/match?

reacon84

New Member
Joined
Sep 13, 2016
Messages
38
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I have some weekly cost data, split into periods.

In cell B8, I'd like the YTD average, based on the period selection in B1.
In cell B9, I'd like the period average, based on the period selection in B1.

For example, if I changed B1 to period "2", B8 would change to "150", and B9 would change to "200".

I feel some sort of averageif with index/match is needed, but can't seem to find a way to make it work!

Thanks in advance.

1731575077411.png


Period:3
Week123456789101112
Period111122223333
Cost100100100100200200200200300300300300
YTD:200
Period:300
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hello, do you mean:

Excel Formula:
=AVERAGEIFS(B6:M6,B4:M4,"<="&B1)

Excel Formula:
=AVERAGEIFS(B6:M6,B4:M4,B1)
 
Upvote 0
Solution

Forum statistics

Threads
1,223,630
Messages
6,173,447
Members
452,514
Latest member
cjkelly15

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