ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Average (https://www.excelbanter.com/excel-worksheet-functions/159941-average.html)

Mike

Average
 
When I use the average function, I want to ignore values like $0.00, #DIV/0!.
How do I do this?

Peo Sjoblom

Average
 
If you don't want to include zero it doesn't make any sense to include
negative values and then this will work

=SUMIF(A2:A10,"0",A2:A10)/COUNTIF(A2:A20,"0")


although it is advisable to correct the div error in it's source like

=IF(D2=0,"",C2/D2)


--


Regards,


Peo Sjoblom


"Mike" wrote in message
...
When I use the average function, I want to ignore values like $0.00,
#DIV/0!.
How do I do this?




JE McGimpsey

Average
 
One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=AVERAGE(IF(ISNUMBER(IF(rng<0,rng)),rng))

where rng is your range of interest.

In article ,
Mike wrote:

When I use the average function, I want to ignore values like $0.00, #DIV/0!.
How do I do this?


Mike

Average
 
This answer was extremely helpful. I didn't have to use the average
function, because I cleared up this issues the division issues. Thank you
for being so attentive and detailed.

"Peo Sjoblom" wrote:

If you don't want to include zero it doesn't make any sense to include
negative values and then this will work

=SUMIF(A2:A10,"0",A2:A10)/COUNTIF(A2:A20,"0")


although it is advisable to correct the div error in it's source like

=IF(D2=0,"",C2/D2)


--


Regards,


Peo Sjoblom


"Mike" wrote in message
...
When I use the average function, I want to ignore values like $0.00,
#DIV/0!.
How do I do this?






All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com