OFFSET and MATCH? How to get rolling 3 month average of income based on moving anchor?

FKalinx

New Member
Joined
Jul 2, 2014
Messages
39
Hello Mr Excel

I am trying to get a rolling average of income for three months. I have created the anchor for current month (which automatically moves based on current month), let's say in cell D1 and want to then average the income in cell B3, C3 and D3 - see below. If the current month was Feb, the anchor would be E1 and the cells I would need averaging would be C3, D3 and E3.

Month - Nov Dec Jan (Current Month)
Cost - 100 200 300
Income 400 400 500

I have tried using OFFSET and MATCH but can't get it to work.

Can a genius please help me out?

Thanks.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi,

Check if this helps:


Book1
ABCDEF
1Monthoktnovdecjanfeb
2Cost175100200300
3Income350400400500
4Average Income0375383433450
Sheet1
Cell Formulas
RangeFormula
B4{=IFERROR(AVERAGE(OFFSET($A$1,2,MATCH(MONTH(B$1),MONTH(1:1)+0,0)-1,1,-3)),0)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
Hi,

Check if this helps:

ABCDEF
1Monthoktnovdecjanfeb
2Cost175100200300
3Income350400400500
4Average Income0375383433450

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
B4{=IFERROR(AVERAGE(OFFSET($A$1,2,MATCH(MONTH(B$1),MONTH(1:1)+0,0)-1,1,-3)),0)}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Thanks, you're a star!
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

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