Just a quick question

  • Thread starter Thread starter Brian Shafer
  • Start date Start date
B

Brian Shafer

I want to be able to average a range of cells, some of these cells are 0,
and those are the ones I don't to include in on the calculation.
 
Brian,

If your data is in "B5:D14"...

=SUM(B5:D14)/COUNTIF(B5:D14,">0")

Regards,
Jim Cone
San Francisco, CA
 
Brian,

If your range actually contains 0 values the following formula (based on a
range G1:G5 will help.
=COUNTIF(G1:G5;"<>0")/COUNTIF(G1:G5;"<>0")

If however your range contains empty cells, the function AVERAGE itself
deals with that. It is calculating the average of non empty cells.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
Sorry,
Formula should be :
=SUM(G1:G5)/COUNTIF(G1:G5;"<>0")

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
This is an array formula and must be entered/edited with control+Shift+enter
instead of just enter.

=AVERAGE(IF(D1:D10>0,D1:D10))
 
Back
Top