Avg every other column IF a value

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

How do I average every other column in the same row but
only if there's a value.

It's a row of values (BUT every other column) by month so
ultimately the denominator will be 12 but if we're only
in April I want to have the denominator as 4 and I don't
want to count zero values for the rest of the year.
 
I just realized, it's more complicated than I just wrote.
I have two columns per month: quantity and price
The row describes the item purchased

Teddy Bear...(Jan qty) 5, (Jan price) $10 then (Feb qty)
8, (Feb price) $11, continue to December.

I want an average price per total units. So, 10 $11
bears carry more weight than 2 $5 bears.

I also don't want months counted if we're not there yet.
 
Hi
not really sure but try something like
=SUMPRODUCT(--(B1:B100>0),B1:B100,C1:C100)/SUMIF(B1:B100,">0")
 
Back
Top