An Excel formula?
Jul. 18th, 2007 02:55 pmDo you know Excel? I need help!
I need an Excel formula. I can make it work on paper, but Excel won't take it. It may be something simple, like a missing comma or paren, or I might be totally off. I used to be an ace, but my Excel foo has been rusting for awhile.
Here's the scoop.
I have two columns of data (A and B).
If they are the same, I want C to zero.
If A is higher, I want a 1.
If B is higher, I want a 2.
What formula do I put in C?
A B C
4 2 1
4 4 0
4 6 2
Here is what I tried:
=IF(A-B=0,0,=IF(A>B,1,2))
OR
=IF(A-B=0,0,(=IF(A>B,1,2)))
Excel doesn't like either one. I even tried the "function entering" wizard, to no avail.
Then I tried making two columns, trying to get the two clauses then compare them in a third. Didn't get very far on that front.
If anyone has a clue, I'd appreciate it.
Thanks!
I need an Excel formula. I can make it work on paper, but Excel won't take it. It may be something simple, like a missing comma or paren, or I might be totally off. I used to be an ace, but my Excel foo has been rusting for awhile.
Here's the scoop.
I have two columns of data (A and B).
If they are the same, I want C to zero.
If A is higher, I want a 1.
If B is higher, I want a 2.
What formula do I put in C?
A B C
4 2 1
4 4 0
4 6 2
Here is what I tried:
=IF(A-B=0,0,=IF(A>B,1,2))
OR
=IF(A-B=0,0,(=IF(A>B,1,2)))
Excel doesn't like either one. I even tried the "function entering" wizard, to no avail.
Then I tried making two columns, trying to get the two clauses then compare them in a third. Didn't get very far on that front.
If anyone has a clue, I'd appreciate it.
Thanks!
no subject
Date: 2007-07-18 07:47 pm (UTC)