Finding the differece between two cells

  • Thread starter Thread starter manickmj
  • Start date Start date
M

manickmj

Hello,

I am trying to get a formula to find the difference between two cells.

I tried the easy way which is =sum(a1-b1). the problem is that onl
works if the numbers are eithor both positive #'s or both negative #'s
It doesn't work if one is positive and one is negative.

Thank you in advance
Mike Manic
 
Hello,

I am trying to get a formula to find the difference between two cells.

I tried the easy way which is =sum(a1-b1). the problem is that only
works if the numbers are eithor both positive #'s or both negative #'s.
It doesn't work if one is positive and one is negative.

Thank you in advance
Mike Manick

If I understand you correctly, how about:

=ABS(A1)-ABS(B1)


--ron
 
The formula

=A1-B1

will work in all combinations of positive and/or negative numbers.
 
If you want the difference between -3 and +1 to be either -2 or +2, you aren't
using the same number system as the rest of the world <g>. To get from -3 to
+1, you have to add 4; going the other direction, +1 to -3, you have to
subtract 4.

The only formula you need is =A1-B1. Sum isn't necessary. You've specified the
operation by using the minus sign.

If for some reason you do want a result of +2 or -2, you can get that by
=ABS(A1)-ABS(B1).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top