View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Average based on the previous row

Try this:

=AVERAGE(IF(MONTH(B2:AF2)=1,B3:AF3))

This is an array formula, so once you have typed it in (or
subsequently edit it) you should commit it with CTRL-SHIFT-ENTER (CSE)
instead of just ENTER. If you do this correctly then Excel will wrap
curly braces { } around the formula when viewed in the formula bar -
you should not type these yourself.

Change the 1 to a 2 for February, etc.

Hope this helps.

Pete


On Feb 5, 10:53 pm, "Gary" wrote:
Hi All,

in row 2 I have dates jan 1 to jun 31
in row 3 I have some data.
now if in cell A60 i need the average of the data in row 3 only for
January....so if Jan starts in cell B2 and ends in cell AF2, I need the
average of data in B3 to AF3

please help.
Thanks