Forum Discussion
Need to search multiple words in a cell and get the output based on the word found.
- Jun 27, 2021
If you have Excel 2019 or Excel in Microsoft 365, enter the following formula in B1:
=TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH({"Generic Mailbox","Distribution","Non-standard","NSSR"},A1)),{"Shared Mailbox","DL","Corporate Request","Non-Standard Service Request"},""))
This allows for more than one of the search terms in a cell.
Otherwise:
=IFERROR(INDEX({"Shared Mailbox","DL","Corporate Request","Non-Standard Service Request"},MATCH(TRUE,ISNUMBER(SEARCH({"Generic Mailbox","Distribution","Non-standard","NSSR"},A1)),0)),"")
Fill down from B1.
I am trying to create a formula to search for the words MR and Meeting room; however, I keep receiving an error. Any suggestions would be appreciated!
=IF(ISNUMBER(SEARCH({"MR","Meeting Room"},S2))=TRUE,{"MR","Meeting Room"},FALSE)
=IFERROR(INDEX({"MR","Meeting Room"},MATCH(TRUE,ISNUMBER(SEARCH({"MR","Meeting Room"},S2)),0)),"")