View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default =AVERAGE(IF(INT(MONTH(C:C)+2/3)=4


Does your 1st quarter start at 1st January?

You could use something like this for 4th quarter of 2005

=AVERAGE(IF("Q"&INT((MONTH(C$1:C$500)+2)/3)&TEXT(C$1:C$500,"-yy")="Q4-05",D$1:D$500-C$1:C$500))

confirmed with CTRL+SHIFT+ENTER

even easier if you put your quarters in one column, e.g. in Y1 "Q1-03",
in Y2 "Q2-03" etc. then use this formula in Z1 and copy formula down
column

=AVERAGE(IF("Q"&INT((MONTH(C$1:C$500)+2)/3)&TEXT(C$1:C$500,"-yy")=Y1,D$1:D$500-C$1:C$500))

confirmed with CTRL+SHIFT+ENTER


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=515284