Forum Discussion

HZ25062016's avatar
HZ25062016
Copper Contributor
Jan 01, 2023
Solved

Extract or return all value/text that matching to multiple criterias/condition

 

In the 1st column, there are a list of countries separated by comma. In the 2nd column, i would like to get a result where it will show or extract the country that matching either to following criteria/condition= China or Hong Kong or Taiwan.

 

Please advise. Thank you.

 

 

 

  • HZ25062016 

    Thanks for the sample. Excel version + OS still missing. Below I assumed Excel 2021 or 365 is in use:

     

     

    EDIT: On reflection, in C3:

    =TEXTJOIN(", ",,IF(COUNTIF(B3, "*" & {"China","Hong Kong","Taiwan"} & "*"),{"China","Hong Kong","Taiwan"},""))

     

     

Resources