Forum Discussion

adminragnar's avatar
adminragnar
Copper Contributor
Nov 09, 2024
Solved

Search for multiple keywords in Excel?

Hello,

 

I have a column with many rows containing different texts.

I would like to be able to search all the rows in that column for any one of a number of different keywords.

 

For example:

I wish to find the rows that contain any of the following keywords:

  • alfa
  • beta
  • gamma

 

But it might not be an exact match. One row might have the following text:

  • find-alfa-value

In this case, I want the formula to find this row, as the row contains the keyword "alfa".

 

Thanks!

  • adminragnar's avatar
    adminragnar
    Copper Contributor

    Hello and thank you for your reply!

    I am very much a beginner at Excel. If I paste the formula as I have done in the screenshot, is that correct?

    • SergeiBaklan's avatar
      SergeiBaklan
      MVP

      Most probably you shall use semicolons instead of commas an function names will be different in your locale. Plus it shall be Excel 365, 2021 or 2024.

      Please open attached file and check formula in G2, it will be shown in your locale notation.

  • Let's say the data are in D2:D100.

    The formula

    =FILTER(D2:D100, ISNUMBER(SEARCH("alfa", D2:D100))+ISNUMBER(SEARCH("beta", D2:D100))+ISNUMBER(SEARCH("gamma", D2:D100)), "")

    will return all values that contain "alfa", "beta" or "gamma" along with possibly other text.

Resources