PDA

View Full Version : Solved: Search within a string



gimli
09-27-2010, 11:59 AM
Hi all,

Not sure how to search for some text values within a string if the values can be random thruout the string. I know you can use mid, right , left to strip out characters but I think for what I need vba may be the only way.

Ex.

In cell A4 the value is 57HT456

If the characters HT are present anywhere in the value in that order I would like to return a value to cell B4 of "yes". If it does not then "no".

I want to do that same check in cells A4 thru A100. The return values of "yes" or "no" will be placed in B4 thru B100.

Any help would be great.

thanks ahead of time

Tinbendr
09-27-2010, 12:35 PM
=IF(ISERROR(FIND("HT",A4)), "NO", "YES")

gimli
09-28-2010, 04:09 AM
Thanks!

:hi: