Excel question: Does substring exist

I need a formula to use in Excel that will simply return TRUE if a certain subset exists within the text of a cell.

Say for example that cell A1 reads “BLAH BLAH BLAH” and I wanted to find out whether the string “AH BL” exists in that cell.

Is there a way to do that? FIND and SEARCH tell you where the string starts, but it assumes the substring has to be in the referenced cell and returns an error if it isn’t present. So, I either I need a formula to directly test it or some way of usefully using the error.

Anybody know of anything?

Yes. See Excel Help for the FIND function. The within_text can be a cell reference.

Sorry, I didn’t read carefully enough. You want to say,

=if(iserr(find(“looking for this”,“within this”)),FALSE,TRUE)

iserr is exactly what I was looking for. Thanks CookingWithGas!

I thought I had looked through that section of the functions but I guess I missed it. I was getting pretty frustrated and we all know that induces blindness.

Much appreciated.

get rid of the quotes for the “within this” if you want to reference a cell

=if(iserr(find(“looking for this”,within this)),FALSE,TRUE)
[/QUOTE]