# Thread: If, contains (2003 (SP2))

1. ## If, contains (2003 (SP2))

Done this before (sometime ago though) & I can neither remember how to do it nor find it. It being using the IF function, where the logical condition is 'contains' e.g. cell A1 contains the letter U. Fun would be true & fin would be false.

2. ## Re: If, contains (2003 (SP2))

Excel has two functions for this: FIND is case-sensitive, and SEARCH is not case-sensitive. Both will return a number if the search text is found, and an error value if not. So you can use a formula like this:
<code>
=IF(ISNUMBER(SEARCH("u",A1)),"Yes","No")
</code>
If you want to search for "u" only, not "U", use FIND instead of SEARCH.

3. ## Re: If, contains (2003 (SP2))

Oops, too late. I'd figured out a method & you'd replied. Anyway, here's my solution (slightly different uses 2 functions);

=IF((COUNTIF(A2,"*u*"))>0,"Yes","No")

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•