Finding the average of multiple (broken up) cells using a function

JBACH92

New Member
Joined
Nov 7, 2015
Messages
12
Hi all, just been racking my brain on this one for a while. I am trying to get an average of the last 6 months (from the previous month: ex: if it's November then May-October) of data in this list the only thing I can think of is a whole bunch of nested "IF(MONTH(TODAY())=11, AVERAGE(blah:blah, blah:blah), ...) There has to be an easier way to do this I keep loosing track of the numbers and dates and all.
JAN
12%
FEB
37%
MAR
26%
APR
102%
MAY
87%
JUN
16%
AUG
12%
SEP
82%
OCT
59%
NOV
18%
DEC
31%
12MONTH
40%
6 MONTH
??%

<tbody>
</tbody>


Thank you in advance!
 
I do understand that at all times a cell must display the average of the previous 6 months results. I assume that say the October figure is updated on November 1 st. Therefore it is very easy to sum the last 6 results and divide by 6

jan25
feb32
mar19
apr24today is
may27
jun2610/11/2015
jul31
aug36
sep30
oct3230.3so Oct is last monthly result
nov
dec
there is a formula in cellsE6 to E15 (mar to dec)
the one giving 30.3 is
=IF(AND(D13<>"",D14=""),SUM(D8:D13)/6,"")
as soon as you enter the Nov number, the 30.3 will disappear and the 6 month
average to Nov will appear, hence you can open and print
at any time

<colgroup><col span="7"><col><col span="7"></colgroup><tbody>
</tbody>
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi, based on the examples from post #6 here is another option you could try, note: this is using an array function that requires to be confirmed using CTRL+SHIFT+ENTER.


Excel 2012
ABCD
1MONTHABC
2JAN12%10022%0.35%
3FEB37%165030.86%
4MAR26%2800%0.92%
5APR102%4528%0.86%
6MAY89%1832%0.83%
7JUN16%802%0.12%
8JUL33%3256%0.03%
9AUG33%41%0.94%
10SEP12%1247%0.67%
11OCT82%3111%0.32%
12NOV18%4015%0.72%
13DEC31%1218%0.41%
146 MONTH44%1715%0%
Sheet1
Cell Formulas
RangeFormula
B14{=AVERAGE(IF($A$2:$A$13=TEXT(EOMONTH(TODAY(),{-1,-2,-3,-4,-5,-6}),"MMM"),B2:B13))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,216,518
Messages
6,131,121
Members
449,624
Latest member
MandlaMan

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