I have a list of cells in Excel, all in column I. Each of the cells has a list of countries and/or regions.
I would like to build a formula that will search the text in the cells in column I for specific strings and return those same strings in the same row of column J. If more than one string is found, then I would like all strings found to be in column J.
The independent strings I would like to look for in column I are: "Africa", "North Africa", "East Africa", "South Africa", "West Africa" and "Central Africa".
If a cell on column I has "Algeria, France, Portugal, East Africa, North Africa, Zimbabwe", then the desired result on column J would be "East Africa, North Africa".
I have managed to build a formula on column J that will look for on of the strings:
=IF(ISNUMBER(SEARCH("Africa", I2)), "Africa", "")
I have also managed to make nested IF statements that will look for each string independently and return, on column J, whichever is first found. However, in this case, only the first string found is returned.
How can I build a formula that will both search for all the strings in one cell (without stopping when it finds the first one) and return them all in column J?
Thank you
