@average function

C

Chazbri

I need help with a "simple" formula in a basic spreadsheet. I have the
months of the year in one column, and a dollar amount in the next column.

Question: If I fill in a number in Jan, Feb, Mar, & April, and fill in
zero's for the rest of the months, what would the formula be to figure the
average of all months that have a number greater than zero?

Thanks for your help.

Dave
 
T

Teethless mama

A2:A13 contain month
B2:B13 contain dollar amount

=AVERAGE(IF(A2:A13<>0,B2:B13))

ctrl+shift+enter, not just enter
 
H

Harlan Grove

Chazbri said:
I need help with a "simple" formula in a basic spreadsheet. I have the
months of the year in one column, and a dollar amount in the next column.

Question: If I fill in a number in Jan, Feb, Mar, & April, and fill in
zero's for the rest of the months, what would the formula be to figure the
average of all months that have a number greater than zero?
....

Another alternative,

=SUMIF(range,">0")/COUNTIF(range,">0")

or for those using Excel 2007,

=AVERAGEIF(range,">0")
 
Top