Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Formula to ave. last 3 months

Hi,

I need to ave. the last 4 months of the year.
I have this formula to do it:
=AVERAGE(OFFSET(B2,,COUNTA(B2:L2),,-(MIN(COUNTA(B2:L2),4))))

The twist is that I need it to ave. every 3rd cell only

example:
a b c d
e f g h
i
Volume Expense unit cost Volume Expense unit cost Volume
Expense unit
124,664 $38,197.15 0.3064 149,972 $46,902.63 0.3127 163,161
$50,837.560.3116

I would like to ave the volume (meaning column a,d,g)

Thank you,
Amit.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Formula to ave. last 3 months

Amit,

You could do this by inserting a new row 1, and using a formula like this in cell A1: Your subject
line says 3 months, your message says 4 month, so I used 4 - change the 4 to whatever is correct:

=IF(A2="Volume",IF(COUNTIF(A2:$IV$2,"Volume")<=4," Sum",""),"")

Copy that to fill row 1, then use the formula

=SUMIF(B1:L1,"Sum",B3:L3)/4

to get the average....

HTH,
Bernie
MS Excel MVP


wrote in message
ps.com...
Hi,

I need to ave. the last 4 months of the year.
I have this formula to do it:
=AVERAGE(OFFSET(B2,,COUNTA(B2:L2),,-(MIN(COUNTA(B2:L2),4))))

The twist is that I need it to ave. every 3rd cell only

example:
a b c d
e f g h
i
Volume Expense unit cost Volume Expense unit cost Volume
Expense unit
124,664 $38,197.15 0.3064 149,972 $46,902.63 0.3127 163,161
$50,837.560.3116

I would like to ave the volume (meaning column a,d,g)

Thank you,
Amit.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 150
Default Formula to ave. last 3 months

Assuming that A1:L1 contains the header (Volume, Expense, Unit Cost,
Volume, Expense, Unit cost, etc.), and A2:L2 contains the corresponding
value, try the following formula that needs to be confirmed with
CONTROL+SHIFT+ENTER...

=AVERAGE(IF(A1:L1="Volume",IF(COLUMN(A2:L2)=LARGE (IF(A1:L1="Volume",COLU
MN(A2:L2)),MIN(4,COUNTIF(A1:L1,"Volume"))),A2:L2)) )

Hope this helps!

In article om,
wrote:

Hi,

I need to ave. the last 4 months of the year.
I have this formula to do it:
=AVERAGE(OFFSET(B2,,COUNTA(B2:L2),,-(MIN(COUNTA(B2:L2),4))))

The twist is that I need it to ave. every 3rd cell only

example:
a b c d
e f g h
i
Volume Expense unit cost Volume Expense unit cost Volume
Expense unit
124,664 $38,197.15 0.3064 149,972 $46,902.63 0.3127 163,161
$50,837.560.3116

I would like to ave the volume (meaning column a,d,g)

Thank you,
Amit.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use months in formula. Dave Dobson Excel Worksheet Functions 15 October 12th 06 05:22 PM
Adding months to dates should account for 28-30-31 day months Graham Excel Worksheet Functions 3 February 1st 06 12:06 PM
need if formula for 12 months blopreste3180 Excel Worksheet Functions 3 January 19th 06 05:40 PM
Formula: Date plus 3 months Carly Excel Discussion (Misc queries) 9 May 19th 05 11:47 PM
How do i change 15 months to read 1 year and 3 months? Marty Excel Discussion (Misc queries) 1 February 17th 05 11:21 PM


All times are GMT +1. The time now is 03:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"