Excel absolute difference between 2 values

Pascal -  
 guyguy -
Hello,
In an Excel spreadsheet, I'm looking for the formula that calculates the difference between 2 values, the result should be in absolute value (without a positive or negative sign).
Thank you very much for your help.
Configuration: Windows XP Internet Explorer 6.0

1 réponse

gbinforme Posted messages 14930 Registration date   Status Contributeur Last intervention   4 742
 
Hello

With your data in A1 and B1, this should solve your issue
=IF(A1>B1;A1-B1;(A1-B1)*-1)

--

Always zen
19
Pascal
 
Thank you very much.
0
LexMarc
 
Hello

Why not use the Absolute function = ABS(A1-B1)
More economical in terms of memory used

@+ LM
3
qlio1 > LexMarc
 
Thank you very much.
0
guyguy
 
Thank you for keeping me informed.
0