bex77: (Default)
[personal profile] bex77
Do 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!

Date: 2007-07-18 07:45 pm (UTC)
From: [identity profile] wellstar.livejournal.com
Okay, something weird is going on with the line break. The instructions to drag-extend it (I don't know the actual term...it's where you click the lower left corner of the cell and pull it down to the next row) should be on a separate line than the formula. Obviously, all you need to type in C1 is the equation with the three addends.

Profile

bex77: (Default)
bex77

November 2024

S M T W T F S
     12
3456789
10111213141516
17181920212223
242526 27282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 13th, 2026 09:05 pm
Powered by Dreamwidth Studios