I am trying to find a certain word in a cell using an if then statement. I would like to find if the cell contains "yes" anywhere in the cell and if it does to name the cell "yes". I would appreciate any help. Thanks.
Try the IF function that follows to determine whether a cell has the consecutive letters "yes" in it, but you can't assign a range name to it without doing so manually or incorporating that action into a macro.
I spoke too soon that the function worked. Unfortunately it only works when yes is first word in the cell or if it is exactly "yes". Sometimes the word yes is in various locations in the cell and sometimes has a "-" or other characters attached to the word. I am just trying to do this with one column. Any suggestions?
sorry but nope - the find function doesn't work like that - just tested the formula on a bunch of different examples and worked on all of them. That formula will return a yes if any 3 characters in the cell show yes.
Tested and works for
aera c yes sdfasefa
\serfyesasetr
a\dsr\ yes-werte
yes
a\f yes
amongst others
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
It's because they have a capital Y
change formula to:
=IF(ISERR(FIND("YES",upper(E2))),"","yes"
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.