Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Subtraction of 2 numbers/cells

Could anyone please help me with this situation (in Excel 2003):
I have 2 cells
A1 = 0 and B1 = 10
In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1=
-10 but my question is:
Is there a formula to calculate in C1 the result if the answer is positive
and if the answer is negative to put 0?

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Subtraction of 2 numbers/cells

Try one of two:
=(A1-B1)*(A1B1)
=(A1-B1)*(A1=B1)
Micky



"Cipri" wrote:

Could anyone please help me with this situation (in Excel 2003):
I have 2 cells
A1 = 0 and B1 = 10
In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1=
-10 but my question is:
Is there a formula to calculate in C1 the result if the answer is positive
and if the answer is negative to put 0?

Thank you in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Subtraction of 2 numbers/cells

It worked your solution and in the mean time i found another one that works
too :)
if(A1<B1,"0",A1-B1)

Thx dude

"מיכאל (מיקי) אבידן" wrote:

Try one of two:
=(A1-B1)*(A1B1)
=(A1-B1)*(A1=B1)
Micky



"Cipri" wrote:

Could anyone please help me with this situation (in Excel 2003):
I have 2 cells
A1 = 0 and B1 = 10
In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1=
-10 but my question is:
Is there a formula to calculate in C1 the result if the answer is positive
and if the answer is negative to put 0?

Thank you in advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 563
Default Subtraction of 2 numbers/cells

But do not put the zero in quotes, that will make it text
if(A1<B1,0,A1-B1)
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Cipri" wrote in message
...
It worked your solution and in the mean time i found another one that
works
too :)
if(A1<B1,"0",A1-B1)

Thx dude

"מיכאל (מיקי) אבידן" wrote:

Try one of two:
=(A1-B1)*(A1B1)
=(A1-B1)*(A1=B1)
Micky



"Cipri" wrote:

Could anyone please help me with this situation (in Excel 2003):
I have 2 cells
A1 = 0 and B1 = 10
In cell C1 i put this formula C1=A1-B1 . Now the answer will be
C1=
-10 but my question is:
Is there a formula to calculate in C1 the result if the answer is
positive
and if the answer is negative to put 0?

Thank you in advance.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Subtraction of 2 numbers/cells

=MAX(0,A1-B1)
--

David Biddulph


"Cipri" wrote in message
...
Could anyone please help me with this situation (in Excel 2003):
I have 2 cells
A1 = 0 and B1 = 10
In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1=
-10 but my question is:
Is there a formula to calculate in C1 the result if the answer is positive
and if the answer is negative to put 0?

Thank you in advance.



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
subtraction of negative numbers Roger Excel Worksheet Functions 9 February 12th 10 03:21 PM
entering dates results in subtraction of numbers Deepak G Excel Worksheet Functions 8 June 5th 08 05:09 AM
how do I set up a simple subtraction between two cells Patricia Braszell Excel Discussion (Misc queries) 1 June 4th 07 08:00 AM
subtraction in a list of numbers that resets with a label. gtslabs Excel Worksheet Functions 5 October 27th 05 02:20 PM
subtraction with time format cells Stefano Excel Worksheet Functions 2 March 17th 05 03:06 PM


All times are GMT +1. The time now is 01:24 AM.

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

About Us

"It's about Microsoft Excel"