ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Forcing DIV/0 to display "0" (https://www.excelbanter.com/excel-discussion-misc-queries/98802-forcing-div-0-display-0-a.html)

Pieter van der Walt

Forcing DIV/0 to display "0"
 
I have a scorecard in Excel 2003 and instead of having DIV/0 errors
displayed is there a way of actually forcing it to display a zero/null
value? I had a looked at conditional formatting and the example only seems
to be hiding it in a different colour.

Thanks
Pieter



Bondi

Forcing DIV/0 to display "0"
 

Pieter van der Walt wrote:
I have a scorecard in Excel 2003 and instead of having DIV/0 errors
displayed is there a way of actually forcing it to display a zero/null
value? I had a looked at conditional formatting and the example only seems
to be hiding it in a different colour.

Thanks
Pieter


Hi Pieter,

One way would be to use ISERROR. SOmething along the lines of

=IF(ISERROR(A1/B1),0,A1/B1)

Where the numbers in the operation is in A1 and A2..

Another would be to tjeck if the denominator is zero something like:

=IF(B1=0,0,A1/B1)

Regards,
Bondi


Pieter van der Walt

Forcing DIV/0 to display "0"
 
Thanks Bondi - got it working!!


"Bondi" wrote in message
oups.com...

Pieter van der Walt wrote:
I have a scorecard in Excel 2003 and instead of having DIV/0 errors
displayed is there a way of actually forcing it to display a zero/null
value? I had a looked at conditional formatting and the example only
seems
to be hiding it in a different colour.

Thanks
Pieter


Hi Pieter,

One way would be to use ISERROR. SOmething along the lines of

=IF(ISERROR(A1/B1),0,A1/B1)

Where the numbers in the operation is in A1 and A2..

Another would be to tjeck if the denominator is zero something like:

=IF(B1=0,0,A1/B1)

Regards,
Bondi





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

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