Average with zeroes obstacle

apwdweb

Board Regular
Joined
Aug 23, 2002
Messages
86
HI,

I have column for which i'd like to the average, however the column has about 4 numbers and the rest are zeroes. I'd like excel to give me the average of this column but ignore any zeroes as values to include.

= AVG( ???)

or maybe you know a better way. I"m open to your ideas.

Thanks
 
Yogi Anand said:
In addition to other fine contributions, with blanks and text entries in the midst, you may also want to try the following non-array formulation ...

=SUM(A1:A10)/SUMPRODUCT(--(A1:A10<>0)*(ISNUMBER(A1:A10)))

A "fine" superexpensive contribution. Congrats. Beautiful too: A gracious combination of -- and *.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi Aladin:

You had compiled a list of various submissions -- the last one I submitted is another formulation. I recognize it is not economical, and thanks for pointing out the redundant coercing with --

By the way, why not leave the sarcasm out and talk to each other professionally -- let me know if that is asking for too much!
 
Upvote 0

Forum statistics

Threads
1,225,477
Messages
6,185,219
Members
453,283
Latest member
Shortm88

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