View Single Post
  #2   Report Post  
Jezebel
 
Posts: n/a
Default Average starting with first month

If the cell "...contains text, logical values, or empty cells, those values
are ignored; however, cells with the value zero are included."

So the quick fix is to insert zeros for the blanks to be included (eg mo 2
and 5 for product 3 in your example -- product 2 works correctly anyway).

You could do this easily by formula: create a second worksheet by copying
the first. Then insert formulas to copy the data from the first worksheet:
if the cell contains a number, use it; else if the cell to its left contains
a number, use 0; else insert blank. Eg if the data starts on sheet 1 at cell
B2, then on sheet 2 cell B2 use

=IF(Sheet1!B20,Sheet1!B2,IF(Sheet1!A2<"",0,""))




"Jim" wrote in message
...
I have a large worksheet of sales data where products are down the rows and
months are across columns. I would like a formula to calculate the
average
monthly sales but only inlude those months starting with the month of
first
sale going forward. If a sale month is zero the cell is blank Example
worksheet:

Mo1 / Mo2 / Mo3 / Mo4 / Mo 5
Product 1 10 / 10 / 8 / 8 / 9 Avg = 9 (Avg includes all months)
Product 2 / 5 / 6 / 7 / 6 Avg = 6 (Avg excludes Mo 1 of
zero)
Product 3 10 / / 8 / 7 / Avg = 5 (Avg includes Mo 2 & 5 of
zero)
etc

Any ideas? Thanks, Jim.