Forum Discussion
HZ25062016
Jan 01, 2023Copper Contributor
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.
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"},""))
- LorenzoSilver Contributor
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"},""))
- HZ25062016Copper Contributorwow! this work well, thank you very much, really help
- LorenzoSilver ContributorYou're welcome & Thanks for providing feedback
- LorenzoSilver Contributor
HZ25062016 Cf. Welcome to your Excel discussion space!: Excel version + OS please
- HZ25062016Copper Contributorsend in message