If-Then Statement

  • Thread starter Thread starter janthony
  • Start date Start date
J

janthony

I am having troubles coming up with the correct syntax for a rathe
simple if-then statement. I don't need if for exactly how I wil
explain what I am trying to do, however this will make it easier.

Let's say we're talking about Sports:

Column A is titled Baseball
Column B is titled Football

Let's say I have 100 kids in my database. Some play football, some pla
baseball. Some play both. Some play neither.

I would like Column C to be setup to evaluate the above and put:

B for baseball
BF for baseball and football
F for football
N for neither

What is the correct syntax to be used for this If-Then statement? An
help would be greatly appreciated.

-Joe Anthon
 
One way

=IF(COUNTA(A2:B2)=0,"N",IF(COUNTA(A2:B2)=2,"BF",IF(A2<>"","B","F")))

This assumes that if a student play football only then B would be empty, if
they play
nothing then both cells would be empty
 
Back
Top