1

I am using the following formula to search for a string and return a value

IF(ISNUMBER(SEARCH("CHA*",B:B),"CINEMA","")

If I want to search for multiple strings whats the formula?, I've tried the following but it isn't returning anything

IF(ISNUMBER(SEARCH({"odeon*","vue*"},B:B),"CINEMA","")
0

2 Answers 2

1

Try this:

=IF(COUNT(SEARCH({"odeon*","vue*"},B:B))>0,"CINEMA","")

Another way:

=IF(OR(ISNUMBER(SEARCH({"odeon*","vue*"},B:B))),"CINEMA","")

Use AND() if you require ALL substrings to match:

=IF(AND(ISNUMBER(SEARCH({"odeon*","vue*"},B:B))),"CINEMA","")
Sign up to request clarification or add additional context in comments.

Comments

0

For starters, you're missing a ) on either formula. And for them to work anyway, you should, as Taosique pointed out, use =IF(OR(ISNUMBER(SEARCH( if you need just one substring, or =IF(AND(ISNUMBER(SEARCH( if you require both.

Good luck!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.