View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim[_51_] Tim[_51_] is offline
external usenet poster
 
Posts: 8
Default Average last seven if not zero

I need to average the last seven numbers (for a week) that aren't zero
in a column. Sometimes there are no zero days during the week,
sometimes one, even up to seven. It changes during the year. Ex.
Monday thru Sunday may all be more than zero, but if Thursday thru
Sunday were zero, I need to include the four previous days in my
average:
A1=10
A2=5
A3=6
A4=0
A5=0
A6=9
A7=10
A8=8
A9=10
A10=15
A11=0
A12=3

In above instance, I need average of A3,A6,A7,A8,A9,A10,A12. (In
column B). I do the average in column B for the whole year, so i need
a running average of the last seven days.

Thank you, Tim