View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Subtraction that doesn't produce an error

Hi

Try this:

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

Regards,
Per

"Andy" skrev i meddelelsen
...
I want to do simple subtraction eg =A1-B1
The problem is, a1 might have an error in it and b1 might have an error in
it.
If either A1 or B1 has an error, I'd want it to just return whatever
number
it has.
That is, if A1 is 7 and B1 has an error, then I'd like it to return 7
(substituting 0 for the error).
Any ideas? Thanks.