Click here for important information about

If statements with text?

Microsoft Office excel 2007 home & stude...
September 1, 2011 at 14:26:31
Specs: Windows XP
I want to build an if statement that evaluates cells with text;

tom, bob, gene | Team 1
tom, gene | Team 1
bob | Team 2
gene | Team 1
tom, bob | Team 2

Basically =if(a1 CONTAINS "gene", "Team 1", "Team 2")

So if Gene's name shows up anywhere in a cell in col A, I'll get Team 1 in col B; if it doesn't, I get Team 2 in col B.


See More: If statements with text?

September 1, 2011 at 15:46:38
First, a posting tip: Before posting any more data in this forum, please click on the blue line at the bottom of this post and read the instructions found via that link.

As far as your question goes try this:

=IF(ISERROR(FIND("gene",A1)),"Team 2","Team 1")

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question