#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Help Needed ASAP

I need to subtract one cell from another cell. However, I don't want to see
any negative numbers, instead I only want a zero. For example:

If A2 is 300 and B2 is 150 than C2 should be 150
If A3 is 150 and B3 is 300 than C3 should be 0 (not -150)

Is this possible, and if so, how do I write the formula.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Help Needed ASAP

=max(0,a2-b2)
=max(0,a3-b3)
Copy this two equations as necessary
--
Wag more, bark less


"casst" wrote:

I need to subtract one cell from another cell. However, I don't want to see
any negative numbers, instead I only want a zero. For example:

If A2 is 300 and B2 is 150 than C2 should be 150
If A3 is 150 and B3 is 300 than C3 should be 0 (not -150)

Is this possible, and if so, how do I write the formula.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Help Needed ASAP

Thank you - this worked!!!

"Brad" wrote:

=max(0,a2-b2)
=max(0,a3-b3)
Copy this two equations as necessary
--
Wag more, bark less


"casst" wrote:

I need to subtract one cell from another cell. However, I don't want to see
any negative numbers, instead I only want a zero. For example:

If A2 is 300 and B2 is 150 than C2 should be 150
If A3 is 150 and B3 is 300 than C3 should be 0 (not -150)

Is this possible, and if so, how do I write the formula.

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Help Needed ASAP

=IF(A2-B20,A2-B2,0)
OR
=IF(A2B2,A2-B2,0)
OR
=IF(A2-B2,A2-B2,0) ' A positive value is treated as TRUE
OR
=(A2<B2)*(A2-B2)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"casst" wrote in message
...
I need to subtract one cell from another cell. However, I don't want to
see
any negative numbers, instead I only want a zero. For example:

If A2 is 300 and B2 is 150 than C2 should be 150
If A3 is 150 and B3 is 300 than C3 should be 0 (not -150)

Is this possible, and if so, how do I write the formula.

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
Two conditions in one cell. Help needed ASAP Marty Excel Discussion (Misc queries) 3 April 19th 08 07:29 PM
HELP ASAP PLEASE!!! Cortney Simmons Charts and Charting in Excel 1 September 8th 06 07:45 AM
Major Help Needed Asap ninjashadow80 Excel Worksheet Functions 7 July 24th 06 04:59 AM
Need help asap potsie Excel Discussion (Misc queries) 3 April 11th 06 09:39 AM
Vlookup Help needed ASAP Vladimir Excel Worksheet Functions 7 October 15th 05 09:48 PM


All times are GMT +1. The time now is 04:49 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"