SEARCH function help

E

Eric Shamlin

Ok, I need to search for partial text matches in an IF statement.

the base formula goes like this:
=IF ((ISNUMBER(SEARCH("index", A1), "Indexed", "Not indexed")

what i need is basically the same thing.. but looking for more than one
search match.

ideally something like:

=IF((ISNUMBER(SEARCH("index" or "table" or "legend"), a1), "Indexed", "Not
Indexed")

Make sense?
 
R

Ron Coderre

Try something like this:

For text in A1
B1: =IF(MAX(COUNTIF(A1,{"*index*","*table*","*legend*"})),"","not ")&"indexed"

If A1 contains any of index, table, or legend the return value is "indexed";
otherwise "not indexed".

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP-Pro
 
B

Biff

Another way:

=IF(OR(ISNUMBER(SEARCH({"index","table","legend"}, A1))), "Indexed", "Not
Indexed")

Biff
 

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

Top