WHICH FUNCTION

M

Malcolm Austin

HI,
this is sure to be easy to those in the know!

Using Excel 2000.

I have to compare scores in two columns (B & C) and wish to have in my
table
either W or L for win or lose.

So in B3 (for) there is 21
and in C3 (against) there is 15

So the table should show a W, but must show an L if the scores are reversed.

Not sure which function to use (tried IF but could not get it to do two
meanings)

So what should I use and how can I write it please?

Malcolm...
 
M

Mike H

Hi,

Try this

=IF(B3>C3,"W","L")

But that won't cater for a draw which this will

=IF(B3>C3,"W",IF(B3<C3,"L","D"))

Mike
 
P

Pete_UK

Try this in D3:

=IF(OR(C3="",B3=""),"",IF(B3>C3,"W",IF(C3>B3,"L","D")))

This also caters for equal scores (D for draw), and for empty cells in
either C3 or B3. Just copy it down as required.

Hope this helps.

Pete
 
S

Shane Devenshire

Hi,

Or you can get cute:

Enter the formula
=B3-C3
and copy it down
Select the range and apply the custom format:
"W";"L";"T"
Choose Format, Cells, Number tab, Custom and enter the above code in the
Type box.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top