Searching inside an Excel cell for one of multiple strings
You can use an Excel formula to check to see when any one of multiple values appears in the contents of a cell.
=SUMPRODUCT(--ISNUMBER(SEARCH($D$2:$D$7,A2)))>0
This formula will check inside cell A2 for the values listed in cells D2 to D7.
When you have a range of cells that you want to search through, enter the list of strings you're looking for hits for with an absolute reference using dollar signs. So in this example, we search through the addresses listed in column A for the state capitals listed in column F. We can pull down the formula entered in cell B2 to the cells below using CTRL + D. The formula will return 'TRUE' when one of the values from cells F2 to F51 are listed in column A.
Comments