Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Darran
 
Posts: n/a
Default calculating the difference between 2 numbers

Does anyone know if it is possible to put together a sum that will add up the
difference between 2 numbers in a cell. for example if 28 is in A1 and 38 is
in A2 the sum would give me the answer of 10. This would be simple if the
higher number was always in colum 2 but what happens if instead of 38 in A2
it was 23. The difference would be 15. I dont want any minus figures.

Is this possible or have I confused everyone that reads this?!!!

Darran.
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

Check out the ABS function in Help:

=ABS(A2-A1)

In article ,
Darran wrote:

Does anyone know if it is possible to put together a sum that will add up the
difference between 2 numbers in a cell. for example if 28 is in A1 and 38 is
in A2 the sum would give me the answer of 10. This would be simple if the
higher number was always in colum 2 but what happens if instead of 38 in A2
it was 23. The difference would be 15. I dont want any minus figures.

Is this possible or have I confused everyone that reads this?!!!

  #3   Report Post  
bj
 
Posts: n/a
Default

try
=abs(a1-a2)

"Darran" wrote:

Does anyone know if it is possible to put together a sum that will add up the
difference between 2 numbers in a cell. for example if 28 is in A1 and 38 is
in A2 the sum would give me the answer of 10. This would be simple if the
higher number was always in colum 2 but what happens if instead of 38 in A2
it was 23. The difference would be 15. I dont want any minus figures.

Is this possible or have I confused everyone that reads this?!!!

Darran.

  #4   Report Post  
Darran
 
Posts: n/a
Default

Thank you both very much, just what I was after so top marks to the both of
you.

Darran




"bj" wrote:

try
=abs(a1-a2)

"Darran" wrote:

Does anyone know if it is possible to put together a sum that will add up the
difference between 2 numbers in a cell. for example if 28 is in A1 and 38 is
in A2 the sum would give me the answer of 10. This would be simple if the
higher number was always in colum 2 but what happens if instead of 38 in A2
it was 23. The difference would be 15. I dont want any minus figures.

Is this possible or have I confused everyone that reads this?!!!

Darran.

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
Calculating growth with negative numbers Tsipi4me Excel Worksheet Functions 3 April 3rd 23 12:12 PM
Cells formated as numbers are calculating like text MM_BAM Excel Discussion (Misc queries) 4 July 7th 05 01:29 AM
Calculating the difference between cells SheriffCassidy Excel Worksheet Functions 3 February 15th 05 06:30 AM
Calculating Date difference in 2 ways Hari Excel Discussion (Misc queries) 5 January 15th 05 10:25 PM
Calculating time difference Robyn Bellanger Excel Discussion (Misc queries) 2 December 23rd 04 02:29 AM


All times are GMT +1. The time now is 06:40 PM.

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"