Thread: average if
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default average if

Try this:

=IF(COUNT(B:B),AVERAGE(OFFSET(B2,COUNT(B:B)-1,,MAX(-COUNT(B:B),-30))),"")

--
Biff
Microsoft Excel MVP


"~slacker~" wrote in message
...
no empty cells in the range.

it doesn't take long to get over 30 values but if it were less than
thirty then i'd want to average the 20 or whatever values that there
were.