How to Count Specific Phrases Across an Excel Workbook
Question details
The user needs to count the occurrences of specific text phrases across one or multiple worksheets in an Excel workbook.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Searching and counting the frequency of a target phrase across a single sheet or multiple sheets in a large data workbook.
- Observed behavior
- The user requires exact or partial phrase match counts spanning large data ranges and multiple worksheets using appropriate formulas.
Before applying these formulas, determine whether you need to count exact matches or partial matches (where the phrase is part of a larger text string), and take note of the exact worksheet names you intend to search.
Use COUNTIF with Wildcards for a Single Worksheet
The simplest method to count partial text matches within a single sheet is using the COUNTIF function combined with asterisk wildcards.
This formula allows you to reference a phrase in one cell (like A1) and count how many cells in a specified range contain that phrase, even if surrounded by other text.
Click on a blank cell where you want the final count result to appear.
Type the formula =COUNTIF(Sheet1!C1:ZZ1000,"*"&A1&"*"), replacing Sheet1!C1:ZZ1000 with your target search range and A1 with the cell containing your search phrase.
Press Enter to display the total number of cells containing that phrase within the specified sheet.

Combine COUNTIF Formulas for Multiple Worksheets
If you need to search across two or more specific worksheets, you can add individual COUNTIF functions together.
Use Dynamic Arrays for Complex Workbooks
For modern spreadsheet environments, utilizing dynamic arrays like VSTACK simplifies counting across multiple sheets.
Master Complex Formulas Easily in WPS Office
WPS Spreadsheet fully supports advanced functions like COUNTIF, SEARCH, and dynamic arrays, making it incredibly easy to count cell phrases across multiple worksheets. It provides a familiar interface to process your data efficiently without the premium price tag.
- 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your .xlsx or .xls file.
- 2. Apply the COUNTIF function: Select an empty cell and type your COUNTIF formula, utilizing the built-in formula prompt for guidance.
- 3. Analyze multiple sheets: Easily reference other sheets by clicking on their tabs while typing your formula to instantly build cross-sheet calculations.

Frequently Asked Questions
Does the COUNTIF function count multiple occurrences of a phrase within the exact same cell?
No, the standard COUNTIF formula only counts the number of cells that contain the phrase at least once. It does not count multiple instances of the phrase inside a single cell.
How can I count exact matches instead of partial matches?
To count exact matches only, remove the asterisk wildcards from your formula. For example, use =COUNTIF(Sheet1!C1:ZZ1000, A1) instead of =COUNTIF(Sheet1!C1:ZZ1000, "*"&A1&"*").
Is there a way to search all sheets without typing each sheet name?
Yes, in newer spreadsheet versions, you can use a 3D reference combined with functions like VSTACK or TOCOL (e.g., Sheet1:Sheet3!A1:Z1000) to reference the same range across multiple continuous sheets at once.




