Search Excel Descriptions for Multiple Keywords with Power Query
Question details
Find an efficient way to search more than 100,000 Excel descriptions for multiple keywords without extensive worksheet array formulas.

- Product
- Microsoft Excel Power Query
- Device & OS
- not provided
- Scenario
- A large table of descriptions must be checked against a separate list of keywords and updated as the source data changes.
- Observed behavior
- The goal is a refreshable list of descriptions containing at least one keyword, without repeating resource-intensive array calculations across the worksheet.
Place descriptions and keywords in separate Excel tables with headers named Description and Keyword. Remove unwanted blank keywords, and check that Power Query is available under Excel's Data tab.
Match descriptions against a keyword table in Power Query
Use a refreshable query to identify descriptions containing any listed keyword without filling the worksheet with array formulas.
This method checks for keywords anywhere in each description and ignores letter case. It is a substring search, so a keyword can also match part of a longer word.
Performance depends on the number of descriptions and keywords. Test a sample first; checking every description against many keywords can still take time.
Select a cell in the keyword table and choose Data > From Table/Range. In Power Query Editor, name the query Keywords, then choose Home > Close & Load > Close & Load To and select Only Create Connection.
Select a cell in the descriptions table and choose Data > From Table/Range. Confirm that its description column is named Description.
In Power Query Editor, choose Add Column > Custom Column and name it Matches. Enter this formula: let d = if [Description] = null then "" else Text.From([Description]) in List.Select(List.RemoveNulls(Keywords[Keyword]), (k) => Text.From(k) <> "" and Text.Contains(d, Text.From(k), Comparer.OrdinalIgnoreCase)). Select OK.
Choose Add Column > Custom Column, name it HasMatch, and enter List.Count([Matches]) > 0. Use the HasMatch column's filter menu to keep true. To show each matched keyword on its own row, use the expand icon on Matches and select Expand to New Rows.
Choose Home > Close & Load to place the results in Excel. After editing either source table, select Data > Refresh All.

Work with Excel description lists in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for Excel formats, making it easy to bring existing workbooks into your workflow. It does not fix Excel Power Query issues or guarantee that Power Query workflows will run in WPS.

Frequently Asked Questions
How do I update the matches after adding descriptions or keywords?
Add the entries to the source Excel tables, then select Data > Refresh All. The query will use the updated table contents.
Does the Power Query search distinguish uppercase from lowercase?
No. The formula uses Comparer.OrdinalIgnoreCase, so a keyword such as "sale" can match "SALE" or "Sale".
Can I see which keywords matched each description?
Yes. In Power Query Editor, use the expand icon on the Matches list column and select Expand to New Rows. A description appears on multiple rows if it matches multiple keywords.
Why does a keyword match part of a longer word?
Text.Contains performs a substring search. For example, "cat" also matches "catalog". Matching whole words requires additional rules for word boundaries.




