extraordinary average formula !!

gaftalik

Well-known Member
Joined
Feb 6, 2003
Messages
521
Office Version
  1. 2016
Platform
  1. Windows
Hello everybody!

1)Is there any formula to put in K6 which may calculates the average of the last 3 months ! should it be a macro or a formula ?
I need also a macro to calculate it automatically each time i add a month data column! :roll:

2) what is the right formula to average only the months of the year 2004 ? :roll:

Thank you very much .
Book1
BCDEFGHIJKLM
3
4
5nov.03dec.03jan.04feb.04mar.04apr.04mai.04jun.04Averagein2004Averagelast3months
63021384011262414#VALUE!??
786372326372710
8115383132273119
96341012295214
10189742881924
11
12
13
Sheet1
 
I'm pretty sure that that I have managed to get this to work for up to a years worth of data. Having some trouble posting it as isze is too big.
Here it is anyway:


formula in AE1 which can be copied across is

=IF(AND(AE3="total", COLUMN(AE:AE)>=(MATCH(9.99999999999999E+307,$A4:$AZ4)-(5+(($AU$9-2)*4)))),"y","")

Hope it is good for you
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Book1.xls
AIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABB
1    y   y   y 
2julaugsepblank
3TOTAL%UTTOTAL%UTTOTAL%UTTOTAL%Average
4168%98318%98428%98558%42.667
55827%48105827%48105827%48105827%58
67133%21507133%21507133%21507133%71
77133%32397133%32397133%32397133%71
8
9Noofmonthstoaverage3
Sheet1
 
Upvote 0
gaftalik said:
...I need to return the average of the "total" columns of the last xx months , but in this case i have one more column after "total"...

The aerlier formula was depending on the layout of your data with blocks of 3 columns. Now one more column after "total" makes the layout of your data "irregular". Can you manage to keep empty the column before the column where your new layout starts?
 
Upvote 0
Gaftalik,

Have you tried the soln I offered. If it dosen't work could you let me know whats wrong with it.
 
Upvote 0
Hi GorD,

I am trying to work it on .. will definitely answer you , many thanks ..
 
Upvote 0
Well , GorD !

I got zero values as result of your first step formula , where is the error ?
 
Upvote 0
formula in AE1 which can be copied across is

=IF(AND(AE3="total", COLUMN(AE:AE)>=(MATCH(9.99999999999999E+307,$A4:$AZ4)-(5+(($AU$9-2)*4)))),"y","")

Hope it is good for you[/quote]

Gaftalik,

I can't see from your post what you have in row 1 . You need the formula above in all cells in row 1. This references another cell in mu case AU9 to set how many weeks average you want.

If the PM your email address I'll e-mail the workbook I created, if it helps

Regds Gordon D
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,224,881
Messages
6,181,539
Members
453,054
Latest member
ezzat

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