If-Then Statement

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
 
P

Peo Sjoblom

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
 

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