Neative Formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hope this is easy (for you). Haven't used excel in a long time and need to
create simple formula and can't figure it out.

Example: I want to show value as zero if addition comes out negative.

12000.00 -10000.00 = (2000.00) but I want the value to be zero not the
negative value.
 
Without creating a custom number format, you could use a formula like this,
assuming the two numbers are cells A1 and A2
=IF(A1-A2<0,0,A1-A2)
 
If your formula is =A1-A2, change it to =MAX(0,A1-A2)
Remember, of course that your example of 12000 - 10000 gives an answer of
+2000, not -2000.
 
Try this:

=Max(0,A1-B1)
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


Hope this is easy (for you). Haven't used excel in a long time and need to
create simple formula and can't figure it out.

Example: I want to show value as zero if addition comes out negative.

12000.00 -10000.00 = (2000.00) but I want the value to be zero not the
negative value.
 
Thanks it worked.

JLatham said:
Without creating a custom number format, you could use a formula like this,
assuming the two numbers are cells A1 and A2
=IF(A1-A2<0,0,A1-A2)
 
The MAX formula that both David Biddulph and RagDyeR provided should work
also, and are probably faster in coming up with the result. That would be of
benefit if you have lots of these formulas being calculated.
 
1. I have the same problem, where a negative number is nonsense and show
should as zero.

2. I think you meant 10,000 - 12,000 = (2,000)?
 
Back
Top