Forum Discussion
Help! If contains formula multiple options.
- Jan 05, 2022The attached version will work in older versions of Excel too, but it will return only one category. 
As previous time I'd suggest to create Dictionary table, not to hardcode texts in formulas.
slightly modified formula in the left table
=LET(
  catN, ISNUMBER(SEARCH(Dict[word], [@Phrase]) ) *
         SEQUENCE( ROWS(Dict[word] ) ),
  catNF, INDEX( FILTER(catN, catN), 1),
   catW, INDEX( Dict[category], catNF),
   IF( catNF, catW, "-") )Thanks SergeiBaklan ! Great Solution! But when I'm trying to use it in a lighter version of excel the formula doesn't work. Can you please help me with that? Thanks
- SergeiBaklanJan 05, 2022Diamond ContributorStrange, your tag is "Excel for web", it shall work on it. - giuliostJan 05, 2022Copper ContributorIt worked the Hans Vogelaar option but with only one category. I'll try again.- HansVogelaarJan 05, 2022MVPFor Excel 2019 and later, you can use TEXTJOIN to return multiple categories: =TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH(Dict[word],[@Phrase])),Dict[category],"")) For Excel 2016 and earlier, you'd probably need a custom VBA function. 
 
 
- HansVogelaarJan 05, 2022MVPThe attached version will work in older versions of Excel too, but it will return only one category.