Looking for the word "WIN" in a cell

  • Thread starter Thread starter F. Lawrence Kulchar
  • Start date Start date
F

F. Lawrence Kulchar

Now van I test for a true-false issue in a cell containing the word 'WIN'??

For example, the followinh cells would provide the following vresults;

win, P1 TRUE
P2, Pa3 FALSE
P4,KING, win TRUE
Tr,win,dr,win,lose TRUE
Lose, Lose, Winfield FASLSE
Lose, Lose, Winfield FALSE


Thanks, FLKulch
 
Based on your samples:

All on one line. Split so that line wrap won't take out any of the space
characters in the formula.

=ISNUMBER(SEARCH(" win "," "
&SUBSTITUTE(A2,","," ")&" "))
 
Try
=IF(ISERROR(FIND("win",A1)),FALSE,TRUE)

It will not match Win though...
If case is not important then you can use UPPER("win") and UPPER(A1)
=IF(ISERROR(FIND(UPPER("win"),UPPER(A1))),FALSE,TRUE)
 
Or you can use SEARCH, which is not case-sensitive, instead of FIND.

Hope this helps.

Pete
 
If case is not important then you can use UPPER("win") and UPPER(A1)
=IF(ISERROR(FIND(UPPER("win"),UPPER(A1))),FALSE,TRUE)

If case is not a factor just use SEARCH and "win":

=IF(COUNT(SEARCH("win",A1)),TRUE)

However, that will fail in these cases:
Lose, Lose, Winfield
Lose, Lose, Winfield
 
Your formula seems NOT to fail with Lose, Lose, Winfield

Which formula? This one:
=IF(COUNT(SEARCH("win",A1)),TRUE)

That formula returns TRUE which is incorrect according to the results you
wanted as posted in you sample.

This formula returns FALSE which is correct according to the results you
wanted as posted in you sample

=ISNUMBER(SEARCH(" win "," "
&SUBSTITUTE(A2,","," ")&" "))
 

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

Back
Top