Search Excel PivotTable Data by Keyword Across Fields
Question details
Find activities containing a keyword across multiple fields, days, or worksheets and display matching records in a PivotTable.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants to search activity data by keyword rather than filtering one PivotTable field at a time.
- Observed behavior
- The desired result is a PivotTable filtered to records whose source data contains the entered keyword.
Identify the source columns that contain the activity text and make sure the source has column headers. If the records are on separate worksheets, combine them into one tabular list with matching columns first.
Filter the PivotTable with a keyword helper column
Use a helper column to flag source rows that contain a keyword in any of the selected text columns.
On the source data worksheet, enter a keyword in an empty cell outside the data, such as H1.
Add a source column named Keyword Match. In its first data row, enter =IF(COUNTIF(A2:D2,"*"&$H$1&"*")>0,"Match","No match"). Replace A2:D2 with the columns to search and H1 with the keyword cell.
Copy the formula down the Keyword Match column for every source row. Check that the first formula refers to the first data row and that the keyword cell reference remains absolute.
Click the PivotTable and choose PivotTable Analyze > Change Data Source. Expand the source range to include Keyword Match if it is not already included, then confirm.
Right-click the PivotTable and select Refresh. In PivotTable Fields, drag Keyword Match to the Filters area, then use its filter dropdown to select Match.

Search PivotTable source data in WPS Spreadsheets
Use a keyword helper column in WPS Spreadsheets to flag matching source rows, then build or refresh a PivotTable and filter it to the matches.
- 1. Open the workbook: Open your Excel workbook in WPS Spreadsheets and locate the worksheet containing the PivotTable source data.
- 2. Enter a keyword: Type the search term in an empty cell outside the source data, such as H1.
- 3. Add a helper column: Add a Keyword Match column and enter =IF(COUNTIF(A2:D2,"*"&$H$1&"*")>0,"Match","No match") in the first data row. Adjust the references and fill the formula down.
- 4. Create or refresh the PivotTable: Select the source data including the helper column and choose Insert > PivotTable, or update the existing PivotTable's source and refresh it.
- 5. Filter the matches: In the PivotTable field list, add Keyword Match to Filters and select Match from its dropdown. Refresh the PivotTable whenever you change the keyword.

Frequently Asked Questions
Can I search one PivotTable field without a helper column?
Yes. Open the dropdown for the row or column field and use its search box to find matching labels. This searches that field's items, not arbitrary text across every source column.
How do I search records from multiple worksheets?
First combine the records into one list with consistent column headers. You can use Excel's Data > Get Data options and Power Query to append compatible tables, then add the keyword helper column to the combined source.
Why does the PivotTable still show the old keyword results?
After changing the keyword cell, right-click the PivotTable and select Refresh. Also check that the helper formulas cover all source rows and that the PivotTable source includes the helper column.
Do I need VBA to search PivotTable data by keyword?
Not for a basic search of selected source columns: a helper column and PivotTable filter can do that. VBA may be useful for a custom search workflow across multiple worksheets without first combining the data.




