look up / match / reference cell
OK, if you want an average for each 3 month period:
Assuming:
A1:L1 = month names
A2:L2 = numeric values
Enter this formula in D3 and copy across to L3:
=IF(D2="","",AVERAGE(B2:D2))
If you want just a single rolling average:
=IF(COUNT(A2:L2)<4,"insufficient
data",AVERAGE(OFFSET(A2,,COUNT(A2:L2)-1,,-3)))
This assumes each month data will be entered from left to right and there
will not be any months where no data is entered.
--
Biff
Microsoft Excel MVP
"Kylie" wrote in message
...
Good point! It's a new reporting structure I am implementing so obviously
for the first 3 months the average won't be applicable.
"T. Valko" wrote:
What do you do in Jan, Feb and Mar when there aren't 3 preceding months?
--
Biff
Microsoft Excel MVP
"Kylie" wrote in message
...
Hi
Am wanting to determine a 3 month average based on the 3 months
proceeding
the current month.
The spreadsheet contains 12 months of data. If the current month is
determined elsewhere in the data on the spreadsheet, how can I use that
so
that I can determine the 3 month average for the months preceeding the
current month.
Eg
Current month = May
jan feb mar apr may june july aug sep oct nov dec
last
3
month avg
5 7 10 6 9
??
(based on feb mar apr)
When June comes around the 3 month average should then move to be based
on
Mar, Apr & May.
Any thoughts??
|