ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with condition (https://www.excelbanter.com/excel-discussion-misc-queries/2505-help-condition.html)

Mike Busch

Help with condition
 
I have two columns that I am dividing one column by the other, yet one column
does not match the same amount of numbers. So when this comes up I would like
it to come up with "0" instead of an "error". In actually I am dividing a
number by 0. Any help thanks in advance..

tjtjjtjt

Something like:
=IF(ISERROR(A1/B1),0,A1/B1)
should do it.
The error will still be there, but it will display as a 0.

tj

"Mike Busch" wrote:

I have two columns that I am dividing one column by the other, yet one column
does not match the same amount of numbers. So when this comes up I would like
it to come up with "0" instead of an "error". In actually I am dividing a
number by 0. Any help thanks in advance..


JE McGimpsey

One way:

Rather than

=A1/B1

use

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

In article ,
"Mike Busch" wrote:

I have two columns that I am dividing one column by the other, yet one column
does not match the same amount of numbers. So when this comes up I would like
it to come up with "0" instead of an "error". In actually I am dividing a
number by 0. Any help thanks in advance..



All times are GMT +1. The time now is 03:21 PM.

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