View Full Version : question for Excel experts
cthomer5000
09-02-2005, 07:50 PM
Maybe this is easier than it seems to me, but I cannot figure out how to do this:
I've got two columns of numbers, both containing positive and negative numbers.
What's the easiest way for me to calculate the difference between the two numbers?
For example, A and B would be my numbers, C would be the result. Is this possible?
A B C
1 -2 3
24 5 19
cthomer5000
09-02-2005, 07:52 PM
the more i think this through, i guess i'm looking to solve for C, right?
A + C = B
I'm shaking off about 8 years of mental rust on my math skills....
edit, well this would work to a degree.... i could just use the absolute value of C when done to get my intended results.
Scarecrow
09-02-2005, 07:56 PM
+ABS(B1-A1)
cthomer5000
09-02-2005, 07:59 PM
thank you.
terpkristin
09-02-2005, 08:02 PM
in C1, put =A1-B1
Then copy the formula for the rest of the cells...
/tk
terpkristin
09-02-2005, 08:04 PM
Dola,
What I typed will give you the real difference (first column - second column)
What Scarecrow said gives absolute value of difference.
/tk
Logan
09-02-2005, 09:39 PM
You're not really showing people the value of a Rutgers education CT.
Just kidding :).
12 PM tomorrow!!!
cthomer5000
09-02-2005, 09:50 PM
You're not really showing people the value of a Rutgers education CT.
Just kidding :).
12 PM tomorrow!!!
1-0 Baby.... 1-0 after tomorrow.
Raven
09-02-2005, 09:51 PM
TK and Scarecrow are actually both wrong. A combination of the two is correct though.
Abs(A-B) is the correct equation
gottimd
09-02-2005, 09:53 PM
He never said he was trying get the absolute value so how could they be wrong?
terpkristin
09-02-2005, 09:54 PM
Mine is the straight subtraction. I took him literally when he said "difference."
=A1-B1
I stand by what I said.
/tk
Raven
09-02-2005, 09:55 PM
He never said he was trying get the absolute value so how could they be wrong?
He did say these were answers he was looking for.
A B C
1 -2 3
24 5 19
FrogMan
09-02-2005, 09:55 PM
TK and Scarecrow are actually both wrong. A combination of the two is correct though.
Abs(A-B) is the correct equation
and in what is yours different from what Scarecrow wrote?
FM
Scarecrow
09-02-2005, 09:56 PM
TK and Scarecrow are actually both wrong. A combination of the two is correct though.
Abs(A-B) is the correct equation
ABS(A-B) = ABS(B-A)
Raven
09-02-2005, 09:59 PM
and in what is yours different from what Scarecrow wrote?
FM
Actually, you are right. Scarecrow's and mine produce the same numbers.
TK is still wrong though. ;)
gottimd
09-02-2005, 10:01 PM
He did say these were answers he was looking for.
A B C
1 -2 3
24 5 19
Yes, but why do you assume that is absolute value?
1- -2 =3
24-5=19
If he would have put
-2 0 2
then I could see he wanted absolute value. But what he has pointed out is merely basic subtraction rules.
Scarecrow
09-02-2005, 10:02 PM
Mine is the straight subtraction. I took him literally when he said "difference."
=A1-B1
I stand by what I said.
/tk
The problem with your equation is that if the number in column A is 1 and the number in column B is 4, yours will give a result of -3; the difference is 3.
Raven
09-02-2005, 10:04 PM
It's like distance in 1-D. The difference is the length between two points.
gottimd
09-02-2005, 10:04 PM
The problem with your equation is that if the number in column A is 1 and the number in column B is 4, yours will give a result of -3; the difference is 3.
How do you know that, unless he added an additional column/row that had a negative result as a positive number.
I think everyone is right, its just some are using different assumptions.
gottimd
09-02-2005, 10:07 PM
What's the easiest way for me to calculate the difference between the two numbers?
Subtract the two like Tk said
What's the easiest way for me to calculate the difference between the two numbers and have the result always be a positive integer?
The abs formula's
FrogMan
09-02-2005, 10:13 PM
as per dictionary.com:
dif·fer·ence http://cache.lexico.com/dictionary/graphics/AHD4/JPG/pron.jpg (https://secure.reference.com/premium/login.html?rd=2&u=http%3A%2F%2Fdictionary.reference.com%2Fsearch%3Fq%3Ddifference) ( P ) Pronunciation Key (http://dictionary.reference.com/help/ahd4/pronkey.html) (dhttp://cache.lexico.com/dictionary/graphics/AHD4/GIF/ibreve.giffhttp://cache.lexico.com/dictionary/graphics/AHD4/GIF/prime.gifhttp://cache.lexico.com/dictionary/graphics/AHD4/GIF/schwa.gifr-http://cache.lexico.com/dictionary/graphics/AHD4/GIF/schwa.gifns, dhttp://cache.lexico.com/dictionary/graphics/AHD4/GIF/ibreve.giffhttp://cache.lexico.com/dictionary/graphics/AHD4/GIF/prime.gifrhttp://cache.lexico.com/dictionary/graphics/AHD4/GIF/schwa.gifns)
n.
The quality or condition of being unlike or dissimilar.
<LI type=a>An instance of disparity or unlikeness. <LI type=a>A degree or amount by which things differ.
A specific point or element that distinguishes one thing from another.
A noticeable change or effect: <CITE>Exercise has made a difference in her health.</CITE>
<LI type=a>A disagreement or controversy.
A cause of a disagreement or controversy.
Discrimination in taste or choice; distinction.
Mathematics. <LI type=a>The amount by which one quantity is greater or less than another.
The amount that remains after one quantity is subtracted from another.
Archaic. A distinct mark or peculiarity.
So going purely on semantics, both scarecrow (part a of above definition, point 6) and tk (part b of above definition, point 6) were right. End of discussion :)
FM
finkenst
09-02-2005, 10:18 PM
The problem with your equation is that if the number in column A is 1 and the number in column B is 4, yours will give a result of -3; the difference is 3.
you are not correct.
The mathematical definition of difference is c=(a-b). C is the difference.
http://en.wikipedia.org/wiki/Subtraction
TK hit it spot on...
math geeks stick together.
--tim
Logan
09-03-2005, 08:05 AM
Can we divert this thread into a discussion of Rutgers football already?
cthomer5000
09-03-2005, 08:25 AM
Somehow an innocent question turned into a math geek gang war.
terpkristin
09-03-2005, 08:45 AM
Well, which is it you're looking for, CT? An absolute value or a simple subtraction problem?
:D
As I said before, I took difference to mean "pure subtraction" (as Tim noted), so I'm still standing by what I said...it's definitely right from an arithmetic point of view. :)
/tk, one of the resident math/physics geeks ;)
cthomer5000
09-03-2005, 09:20 AM
i was looking for the absolute value of the difference between the two numbers... so the first equation posted did it for me.
Passacaglia
09-03-2005, 09:47 AM
I'm as much of a math geek as the next guy, but I think the deal is that pretty much everyone else assumed cthomer knew how to subtract two numbers in excel, and therefore assumed he was talking about absolute value.
QuikSand
09-03-2005, 10:55 AM
I'm as much of a math geek as the next guy, but I think the deal is that pretty much everyone else assumed cthomer knew how to subtract two numbers in excel, and therefore assumed he was talking about absolute value.
Hey, no fair using common sense in a math debate! We like dictionary definitions better, not ones that actually make the situation sensible.
terpkristin
09-03-2005, 10:58 AM
And, for the record, my old roommate didn't know how to subtract using Excel. Granted, he wasn't the brightest crayon in the box, but it still struck me as crazy that he didn't know how to use the most SIMPLE functions/features in Excel. ;)
/tk
cthomer5000
09-03-2005, 11:00 AM
Well, I now know you assumed I was a moron, and I will forever hold it against you.
terpkristin
09-03-2005, 11:05 AM
Awww, CT, I didn't mean it like that.
I just meant to say that I don't assume ANYTHING anymore with regards to Excel, so if someone asks what might seem like a basic question, I don't necessarily assume that it's not a basic question.
:D ;)
/tk
finkenst
09-03-2005, 12:47 PM
Somehow an innocent question turned into a math geek gang war.
After reading the katrina thread, this brought a smile to my face. Thank you, cthomer5000
Well, I now know you assumed I was a moron, and I will forever hold it against you.
I only looked in this thread because I wanted to see what elegant solution FM was going to come up with. :)
FrogMan
09-03-2005, 01:21 PM
I only looked in this thread because I wanted to see what elegant solution FM was going to come up with. :)
and I'm sure you feel let down right about now ;)
FM
finkenst
09-03-2005, 01:38 PM
and I'm sure you feel let down right about now ;)
FM
just a little, yeah... http://dynamic.gamespy.com/%7Efof/forums/images/smilies/cool.gif
but then the question was pretty straightforward.
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.