PC Review


Reply
Thread Tools Rate Thread

how do I write a formula if b2 is less than a2 then subtract

 
 
=?Utf-8?B?ZGVsZXRlIGF1dG9tYXRpY2FsbHk=?=
Guest
Posts: n/a
 
      2nd Oct 2007
I'm looking for a formula that says if b2 is less than a2 then subtract but
if greater than then add
Thanks
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      2nd Oct 2007
Try:

=IF(B2<A2,A2-B2,A2+B2)

although you didn't specify what to do when A2=B2. this formula would add
A2 and B2 when they are equal.




"delete automatically" wrote:

> I'm looking for a formula that says if b2 is less than a2 then subtract but
> if greater than then add
> Thanks

 
Reply With Quote
 
 
 
 
Trevor Shuttleworth
Guest
Posts: n/a
 
      2nd Oct 2007
Not sure I understand but ...

=IF(A2>B2,A2-B2,A2+B2)

Regards

Trevor


"delete automatically" <(E-Mail Removed)> wrote
in message news:8088169D-9B29-483F-8B0B-(E-Mail Removed)...
> I'm looking for a formula that says if b2 is less than a2 then subtract
> but
> if greater than then add
> Thanks



 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      2nd Oct 2007
> I'm looking for a formula that says if b2 is less than a2 then subtract

Ok, subtract what? B2 from A2?

Also, you didn't say what to do if A2 = B2.

=IF(B2<A2,A2-B2,A2+B2)

If A2 = B2 they will be added.

--
Biff
Microsoft Excel MVP


"delete automatically" <(E-Mail Removed)> wrote
in message news:8088169D-9B29-483F-8B0B-(E-Mail Removed)...
> I'm looking for a formula that says if b2 is less than a2 then subtract
> but
> if greater than then add
> Thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete rows that have data less than 20 items or less than value of £300 Crowbar via OfficeKB.com Microsoft Excel Programming 3 24th Oct 2005 09:33 PM
if month is less than halfway over subtract 1 =?Utf-8?B?Y29hbF9taW5lcg==?= Microsoft Excel Worksheet Functions 3 4th May 2005 03:57 PM
Grammar - "less then" s/b "less than" Doug Security and Anti-Spyware Community 0 13th Jan 2005 01:29 PM
Gramatical error "Less then 2 minutes" should read "Less than 2 minutes" DarrenM Spyware Discussion 3 7th Jan 2005 06:32 PM
How can I write an if-then formula for 0 or less than 0 in cell t. =?Utf-8?B?QmF6MQ==?= Microsoft Excel Worksheet Functions 1 30th Nov 2004 05:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:05 AM.