Thanks:  0
Likes:  0

# Thread: Difference between 2 numbers

1. I simply want to calculate the difference between two numbers in A1 & B1

2. are you kidding ?

3. No

if A1 = 20 and B1 = 30 then A1-B1 = -10 and I want it to display the difference as being 10

[ This Message was edited by: Peter100 on 2002-05-04 17:12 ]

4. =ABS(A1-B1)

5. Hello Peter

try the abs function
Suppose you have the formula in c1

=abs(a1-b1)

6. Cheers Fellas

I was searcing for Diff or something similar

7. Why not just =b1-a1?

8. Because the nest row might have the data reversed and then the problem would be the same

9. ## Re: Difference between 2 numbers

Use this:

=IF((A1-B1)<=0,B1-A1,A1-B1)

10. ## Re: Difference between 2 numbers

Originally Posted by pmchagnon
Use this:

=IF((A1-B1)<=0,B1-A1,A1-B1)

Thank you! This is what I was looking for.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•