Average without zeros

goosteroo

New Member
Joined
Oct 28, 2005
Messages
42
Hi. How do I calculate averages without including zeros?

i.e.

A B C D
0 6 0 2

The AVERAGE() formula gives "2" as the answer, but without including "0," it's 4.

What would the formula be?

Thanks.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

try this
  A   B  C  
1 txt    4  
2 2         
3 0         
4 6         

list

[Table-It] version 06 by Erik Van Geit
Code:
RANGE FORMULA (1st cell)
C1    {=AVERAGE(IF((A1:A4)<>0,A1:A4))}

 enter formula without {}
 confirm with Control-Shift-Enter

[Table-It] version 06 by Erik Van Geit

kind regards,
Erik
 
Upvote 0
Either

=AVERAGE(IF(A1:D1<>0,A1:D1))

confirmed with CTRL+SHIFT+ENTER

or, assuming all data is numeric

=SUM(A1:D1)/MAX(1,COUNTIF(A1:D1,"<>0"))

which only requires ENTER

edited typo in first formula
 
Upvote 0

Forum statistics

Threads
1,225,563
Messages
6,185,704
Members
453,316
Latest member
mani_mech031

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top