divide by zero

  • Thread starter Thread starter Meebers
  • Start date Start date
M

Meebers

If in cell c1 I have a formula =a1/b1 and either one or both are empty, how
do I check for that so as not to produce a divide by 0.
 
The divide by zero error will only happen when B1 equals zero, so just test
for that condition. Unfortunately, you didn't say what you want to happen
for this condition, so I'll just show ??? in the cell (change that to
whatever you want)...

IF(B1=0,"???",A1/B1)
 
Tx Rick and David, yes I wanted "" in either condition. no data in A gives
me a "0" and no data in B gives me #DIV/0! My question should have been
"so as not to produce a "0" or #DIV/0!" In other places on the sheet, I
want a 0 (zero) and therefore opting for do not show 0 values was not
chosen. TIA
 
Back
Top