Formula for omitting zeros in an average

jrpeel22

New Member
Joined
Aug 10, 2011
Messages
6
Basically, I have 3 columns (A, X, Z) and I want it to average those without factoring in the zero.

The closest thing I could find towards performing this is the formula listed below:

=SUM(A1:A100)/COUNTIF(A1:A100,">0")

I altered the forumala to the following to suit my needs:

=SUM(A,X,Z)/COUNTIF(A,X,Z,">0")

The above formula did not work and futhermore I'm not even sure I have the right formula for what I am trying to accomplish.

Please help! Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Welcome to the board.
Non contiguous ranges stink!!!

You'll have to do someting like
=SUM(A,X,Z)/(COUNTIF(A,">0")+COUNTIF(X,">0")+COUNTIF(Z,">0"))

I have a thought for something better, but it's still developing.....
 
Upvote 0
Basically, I have 3 columns (A, X, Z) and I want it to average those without factoring in the zero.

The closest thing I could find towards performing this is the formula listed below:

=SUM(A1:A100)/COUNTIF(A1:A100,">0")

I altered the forumala to the following to suit my needs:

=SUM(A,X,Z)/COUNTIF(A,X,Z,">0")

The above formula did not work and futhermore I'm not even sure I have the right formula for what I am trying to accomplish.

Please help! Thanks!
Assuming no negative numbers involved...

Book1
AXZAA
29213051
3027100_
433041_
5464859_
Sheet1

This formula entered in AA2:

=SUM(A2:A5,X2:X5,Z2:Z5)/INDEX(FREQUENCY((A2:A5,X2:X5,Z2:Z5),0),2)
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,266
Members
452,902
Latest member
Knuddeluff

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