ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula (https://www.excelbanter.com/excel-worksheet-functions/229159-formula.html)

Diane

Formula
 
I know how to hide the formula if it equals zero, however can I eliminate
those cells from the cell that gives me a SUM with division in the formula?
I get the error code of #DIV/0!

Duke Carey

Formula
 
You can eliminate the errors by using a formula like:

=IF(A5=0,"NA",B5/A5)

The SUM() won't generate errors in that case

"Diane" wrote:

I know how to hide the formula if it equals zero, however can I eliminate
those cells from the cell that gives me a SUM with division in the formula?
I get the error code of #DIV/0!


Mike H

Formula
 
Diane,

It's better to eliminate the error by checking if the divisor is zero but to
sum with those errors in the range try

=SUMIF(A1:A12,""&0)

Mike

"Diane" wrote:

I know how to hide the formula if it equals zero, however can I eliminate
those cells from the cell that gives me a SUM with division in the formula?
I get the error code of #DIV/0!



All times are GMT +1. The time now is 04:03 AM.

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