![]() |
|
|
#1 | ||
|
Strategy Moderator
Join Date: Nov 2001
Location: North Carolina
|
question for Excel experts
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
__________________
|
||
|
|
|
|
|
#2 |
|
Strategy Moderator
Join Date: Nov 2001
Location: North Carolina
|
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.
__________________
Last edited by cthomer5000 : 09-02-2005 at 07:54 PM. |
|
|
|
|
|
#3 |
|
College Prospect
Join Date: Oct 2000
Location: The Flatlands of America
|
+ABS(B1-A1)
__________________
Post Count: Eleventy Billion - so deal with it! |
|
|
|
|
|
#4 |
|
Strategy Moderator
Join Date: Nov 2001
Location: North Carolina
|
thank you.
|
|
|
|
|
|
#5 |
|
Grizzled Veteran
Join Date: May 2003
Location: Ashburn, VA
|
in C1, put =A1-B1
Then copy the formula for the rest of the cells... /tk
__________________
GO TERPS! https://www.flickr.com/photos/terpkristin https://twitter.com/terpkristin |
|
|
|
|
|
#6 |
|
Grizzled Veteran
Join Date: May 2003
Location: Ashburn, VA
|
Dola,
What I typed will give you the real difference (first column - second column) What Scarecrow said gives absolute value of difference. /tk
__________________
GO TERPS! https://www.flickr.com/photos/terpkristin https://twitter.com/terpkristin |
|
|
|
|
|
#7 |
|
Head Coach
Join Date: Oct 2000
Location: NYC
|
You're not really showing people the value of a Rutgers education CT.
Just kidding .12 PM tomorrow!!! |
|
|
|
|
|
#8 | |
|
Strategy Moderator
Join Date: Nov 2001
Location: North Carolina
|
Quote:
1-0 Baby.... 1-0 after tomorrow. |
|
|
|
|
|
|
#9 |
|
College Prospect
Join Date: Oct 2000
Location: Baltimore, MD
|
TK and Scarecrow are actually both wrong. A combination of the two is correct though.
Abs(A-B) is the correct equation |
|
|
|
|
|
#10 |
|
Dearly Missed
(9/25/77-12/23/08) Join Date: Nov 2003
Location: DC Suburbs
|
He never said he was trying get the absolute value so how could they be wrong?
__________________
NAFL New Orleans Saints GM/Co-Commish MP Career Record: 114-85 NAFL Super Bowl XI Champs In memory of Gavin Anthony: 7/22/08-7/26/08 |
|
|
|
|
|
#11 |
|
Grizzled Veteran
Join Date: May 2003
Location: Ashburn, VA
|
Mine is the straight subtraction. I took him literally when he said "difference."
=A1-B1 I stand by what I said. /tk
__________________
GO TERPS! https://www.flickr.com/photos/terpkristin https://twitter.com/terpkristin |
|
|
|
|
|
#12 | |
|
College Prospect
Join Date: Oct 2000
Location: Baltimore, MD
|
Quote:
He did say these were answers he was looking for. A B C 1 -2 3 24 5 19 |
|
|
|
|
|
|
#13 | |
|
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
Quote:
and in what is yours different from what Scarecrow wrote? FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
|
|
|
|
|
|
#14 | |
|
College Prospect
Join Date: Oct 2000
Location: The Flatlands of America
|
Quote:
ABS(A-B) = ABS(B-A)
__________________
Post Count: Eleventy Billion - so deal with it! |
|
|
|
|
|
|
#15 | |
|
College Prospect
Join Date: Oct 2000
Location: Baltimore, MD
|
Quote:
Actually, you are right. Scarecrow's and mine produce the same numbers. TK is still wrong though. ![]() |
|
|
|
|
|
|
#16 | |
|
Dearly Missed
(9/25/77-12/23/08) Join Date: Nov 2003
Location: DC Suburbs
|
Quote:
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.
__________________
NAFL New Orleans Saints GM/Co-Commish MP Career Record: 114-85 NAFL Super Bowl XI Champs In memory of Gavin Anthony: 7/22/08-7/26/08 |
|
|
|
|
|
|
#17 | |
|
College Prospect
Join Date: Oct 2000
Location: The Flatlands of America
|
Quote:
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.
__________________
Post Count: Eleventy Billion - so deal with it! |
|
|
|
|
|
|
#18 |
|
College Prospect
Join Date: Oct 2000
Location: Baltimore, MD
|
It's like distance in 1-D. The difference is the length between two points.
|
|
|
|
|
|
#19 | |
|
Dearly Missed
(9/25/77-12/23/08) Join Date: Nov 2003
Location: DC Suburbs
|
Quote:
I think everyone is right, its just some are using different assumptions.
__________________
NAFL New Orleans Saints GM/Co-Commish MP Career Record: 114-85 NAFL Super Bowl XI Champs In memory of Gavin Anthony: 7/22/08-7/26/08 |
|
|
|
|
|
|
#20 |
|
Dearly Missed
(9/25/77-12/23/08) Join Date: Nov 2003
Location: DC Suburbs
|
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
__________________
NAFL New Orleans Saints GM/Co-Commish MP Career Record: 114-85 NAFL Super Bowl XI Champs In memory of Gavin Anthony: 7/22/08-7/26/08 |
|
|
|
|
|
#21 | |
|
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
as per dictionary.com:
Quote:
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
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
|
|
|
|
|
|
#22 | ||
|
College Benchwarmer
Join Date: Jul 2003
Location: usually sunny SoCal
|
Quote:
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
__________________
Quote:
|
||
|
|
|
|
|
#23 |
|
Head Coach
Join Date: Oct 2000
Location: NYC
|
Can we divert this thread into a discussion of Rutgers football already?
|
|
|
|
|
|
#24 |
|
Strategy Moderator
Join Date: Nov 2001
Location: North Carolina
|
Somehow an innocent question turned into a math geek gang war.
|
|
|
|
|
|
#25 |
|
Grizzled Veteran
Join Date: May 2003
Location: Ashburn, VA
|
Well, which is it you're looking for, CT? An absolute value or a simple subtraction problem?
![]() 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 ![]()
__________________
GO TERPS! https://www.flickr.com/photos/terpkristin https://twitter.com/terpkristin |
|
|
|
|
|
#26 |
|
Strategy Moderator
Join Date: Nov 2001
Location: North Carolina
|
i was looking for the absolute value of the difference between the two numbers... so the first equation posted did it for me.
|
|
|
|
|
|
#27 |
|
Coordinator
Join Date: Oct 2000
Location: Big Ten Country
|
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.
|
|
|
|
|
|
#28 | |
|
lolzcat
Join Date: Oct 2000
Location: Annapolis, Md
|
Quote:
Hey, no fair using common sense in a math debate! We like dictionary definitions better, not ones that actually make the situation sensible. |
|
|
|
|
|
|
#29 |
|
Grizzled Veteran
Join Date: May 2003
Location: Ashburn, VA
|
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
__________________
GO TERPS! https://www.flickr.com/photos/terpkristin https://twitter.com/terpkristin |
|
|
|
|
|
#30 |
|
Strategy Moderator
Join Date: Nov 2001
Location: North Carolina
|
Well, I now know you assumed I was a moron, and I will forever hold it against you.
|
|
|
|
|
|
#31 |
|
Grizzled Veteran
Join Date: May 2003
Location: Ashburn, VA
|
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. ![]() /tk
__________________
GO TERPS! https://www.flickr.com/photos/terpkristin https://twitter.com/terpkristin |
|
|
|
|
|
#32 | |||
|
College Benchwarmer
Join Date: Jul 2003
Location: usually sunny SoCal
|
Quote:
After reading the katrina thread, this brought a smile to my face. Thank you, cthomer5000 Quote:
I only looked in this thread because I wanted to see what elegant solution FM was going to come up with. ![]()
__________________
Quote:
|
|||
|
|
|
|
|
#33 | |
|
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
Quote:
and I'm sure you feel let down right about now ![]() FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
|
|
|
|
|
|
#34 | ||
|
College Benchwarmer
Join Date: Jul 2003
Location: usually sunny SoCal
|
Quote:
just a little, yeah... ![]() but then the question was pretty straightforward.
__________________
Quote:
|
||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|