Error

  • Thread starter Thread starter courtesio99
  • Start date Start date
C

courtesio99

Is there any way to set a cell to 0 if any error(eg DIV/0 or VALUE
occurs
 
It depends what You are doing.
You may use IF function, for instance. Assuming that You want to divide
value in cell A2 by value in B2 You may write a following formula:
=IF(B2=0,0,A2/B2)
It will check if value in B2 equals 0 and if so return 0, if the opposite
return result of A2/B2.
 
Hi courtesio99!

Here's an example of the standard approach:

=IF(ISERROR(A1/A2),"",A1/A2)

But make sure that you are happy with the errors that you are hiding.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top