Lars Holmqvist
Lars Holmqvist

Reputation: 81

Excel if funktion

I have the following formula to search for the word "IT". If found, it returns the word "Red"; otherwise "Blue".

How can I do the same, but searching for more than one word?

=IF(IFERROR(SEARCH("IT";D5);0);"Red";"Blue")

Upvotes: 0

Views: 73

Answers (1)

=IF(AND(ISERROR(SEARCH("IT",D5)),ISERROR(SEARCH("otherWord",D5))),
"Neither of the two words are there","One or both words are there")

Upvotes: 2

Related Questions