ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Divided by zero (https://www.excelbanter.com/excel-programming/395030-divided-zero.html)

Hassan

Divided by zero
 
Hi All,

I have two cells e.g. a1 & b1 and c1 contains the formula =a1/b1, if b1
equals to 0 then i need that formula returns 0 in c1 instead of #DIV/0!

Plz help

Regards

Hassan

Tom Ogilvy

Divided by zero
 
=if(iserror(a1/b1),0,a1/b1)

or

=if(b1=0,0,a1/b1)

--
Regards,
Tom Ogilvy


"Hassan" wrote:

Hi All,

I have two cells e.g. a1 & b1 and c1 contains the formula =a1/b1, if b1
equals to 0 then i need that formula returns 0 in c1 instead of #DIV/0!

Plz help

Regards

Hassan


Gordon Rainsford[_3_]

Divided by zero
 

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

Hassan wrote:

Hi All,

I have two cells e.g. a1 & b1 and c1 contains the formula =a1/b1, if b1
equals to 0 then i need that formula returns 0 in c1 instead of #DIV/0!

Plz help

Regards

Hassan



--
Gordon Rainsford

London UK


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

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