Home > Software design >  How to index match search for any word in a sentence
How to index match search for any word in a sentence

Time:07-30

In MS Excel: There's a long list of sentences that I'm I'm trying to categorize based on whether if any of the keywords can be found in the sentence. For example, the keywords "cat", and "dog" fall under the "Animal" category. If a sentence (eg. "Bob's cat is fat") contains either of these keywords, then in the output column (column H in attached picture), this sentence should be categorized as "Animal". I've tried this formula but it doesn't seem to work:

INDEX([categories], MATCH(TRUE, SUM(IFERROR(FIND([keywords]),0))>4, 0)) Where 4 represents the number of cells (both columns and rows) that hold the keywords.

Can someone please help me out? I"m using Office 2021. Thanks! enter image description here

  • Related