if- then question

B

bubba1965

Is it possible to compare two rows and then based on the value, assign
a character to occupy and adjacent column in the same row.

For example, I want to compare all of the numbers in column B, with th
numbers in column D, if B is greater than D, I want to put the lette
"W" in the adjacent column (in the same row). If B is less than D,
want to put the letter "L" in the adjacent column.

Is this possible
 
F

Frank Kabel

Hi
enter the following in the adjacent row (lets say in column E, cell E1)
=IF(B1>D1,"W",IF(B1<D1,"L","equal")
 
B

Bob Phillips

??

C1: =IF(B1>D1,"W",IFN1<D1,"L",""))

and copy down

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
G

gaftalik

Hi ,please try this if i understood you well :


If (B1>D1;"W";"L") and drag your formula in the cells where you nee
tha
 
F

Frank Kabel

Bob said:
??

C1: =IF(B1>D1,"W",IFN1<D1,"L",""))

and copy down

Bob
I think it's getting late for both of us :)
I missed the closing parenthesis and an opening one.

For the OP try
C1: =IF(B1>D1,"W",IF(B1<D1,"L",""))
 
B

bubba1965

If (B1>D1;"W";"L")

I guess I need to if statements if that is possible.

If B1>D1 then W
If B1<D1 then L

So can I use this formula?

If (B1>D1;"W")
If (B1<D1;"L")
 
A

AlfD

But you don't seem to allow B1 to be equal to D1. If it cannot be equal
OK. Otherwise you will have to decide what to do.

Al
 
B

Bob Phillips

Spellchecker doesn't catch that. My excuse is the red wine in my left hand
(don't tell Norman, but it is Australian!)

Bob
 
B

bubba1965

So you only need the equal if the numbers may be equal?

These are basketball scores, so they will never be equal - so can
leave equal off the formul
 
F

Frank Kabel

Bob said:
Spellchecker doesn't catch that. My excuse is the red wine in my left
hand (don't tell Norman, but it is Australian!)

Bob

Sound delicious (a Shiraz maybe?) and excuse fully accepted :)
 
A

AlfD

Yes: you only need the equal if the scores can be eqaul.
Are you sure there can never be a draw in basketball? If you are (I
don't know the rules but maybe they play to a finish, or something) OK.
If you only believe they can't be equal, then better safe than sorry:
it's easy to take out the insurance.

Alf
 
N

Norman Harker

Hi Bob!

Re: "don't tell Norman, but it is Australian!"

Where's mine!

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
B

Bob Phillips

Jacob's Grenache-Shiraz - good spot.

Norman, yours is on my kitchen table.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

Valpolicella ...uuumh. Envy over here!

Just don't tell me you are rounding off with a 25 year old Macallan.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

Bob said:
Valpolicella ...uuumh. Envy over here!

Just don't tell me you are rounding off with a 25 year old Macallan.

No not this evening <vbg>
I 'have' to test this wine as we're having a little private wine
tasting 'competition' this weekend :)
 
N

Norman Harker

Hi Bob!

Thanks for the thought.

Nice little Barolla would go down very well right now but I'll settle
for Jacobs Creek. I think our vintners tended to copy Italians rather
than Germans.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
F

Frank Kabel

Hi Bob!

Thanks for the thought.

Nice little Barolla would go down very well right now but I'll settle
for Jacobs Creek. I think our vintners tended to copy Italians rather
than Germans.

and be glad they do :)
There is no such thing as a good German red wine (IMHO). Though we have
some nice white wines :)
 
Top