Forum Discussion

Santhosh_V's avatar
Santhosh_V
Copper Contributor
Jun 27, 2021
Solved

Need to search multiple words in a cell and get the output based on the word found.

Hi,   I am having a data in column A like below, then I need search for multiple words like "Generic Mailbox", "Distribution", "Non-standard", "NSSR" in the each cell and then if "Generic mailbox"...
  • HansVogelaar's avatar
    Jun 27, 2021

    Santhosh_V 

    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.

Resources