Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 414
Default Subtraction that doesn't produce an error

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Subtraction that doesn't produce an error

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

Luke M
*Remember to click "yes" if this post helped you!*


"Andy" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to produce Hyperlinks franklin85 Excel Discussion (Misc queries) 2 October 30th 08 09:42 AM
Button to produce Popup TheSAguy Excel Discussion (Misc queries) 1 May 22nd 08 03:59 PM
What is the roundoff error in the subtraction function? Bill Owens Excel Worksheet Functions 3 January 1st 06 12:25 AM
produce a formulate to produce assigned seats for dinner DavidJoss Excel Worksheet Functions 0 October 4th 05 02:29 AM
Error in Addition and Subtraction stat721 Excel Discussion (Misc queries) 2 August 9th 05 11:54 PM


All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"