Function Problems

How to Use COUNTIF Across Multiple Excel Sheets

John WilsonJohn Wilson Nov 10, 2026 874 views

Question details

The user needs to count occurrences of specific text, such as employee names, across multiple daily worksheets where the names appear in different positions but within the same range.

How to Count Across the Same Range on Multiple Excel Sheets
Product
Excel
Device & OS
not provided
Scenario
Tracking and tallying employee names or text occurrences across daily or weekly sheets in a single workbook.
Observed behavior
Requires a formula that can dynamically aggregate and count values spanning a 3D range across multiple worksheet tabs.
Before you start

Ensure all the worksheets you want to include in the calculation are grouped together consecutively in your workbook to use a 3D reference effectively.

Solution 1Recommended

Use Advanced Array Functions (LET, TOCOL, GROUPBY) in Excel 365

Combine the daily ranges into a single array and count the occurrences of each name seamlessly using modern Excel functions.

If you are using a recent version of Excel, you can utilize modern array functions to stack data from multiple sheets into a single column and automatically group and count them.

1
Select Target Cell

Click on the cell in your master summary sheet where you want to display the final counts.

2
Enter the Formula

Type the formula: `=LET(x,TOCOL(Sheet2:Sheet4!A2:A100,1),GROUPBY(x,x,COUNTA,,0))`

3
Adjust Sheet References

Replace 'Sheet2:Sheet4' with the actual names of your starting and ending sheets, and adjust 'A2:A100' to match your data range.

4
Apply and Calculate

Press Enter to generate a stacked list of unique names alongside their respective occurrence counts.

Use Advanced Array Functions (LET, TOCOL, GROUPBY) in Excel 365
Version Compatibility: This formula uses the GROUPBY and TOCOL functions, which are available in newer versions of Excel such as Microsoft 365. For older versions, alternative methods like SUMPRODUCT and INDIRECT are required.
Count Data Easily with WPS

Easily Manage and Count Across Sheets in WPS Spreadsheet

WPS Spreadsheet fully supports advanced array functions and multi-sheet references. You can quickly aggregate data across daily worksheets with familiar Excel-like formulas without compatibility issues.

  1. 1. Open Your Workbook: Launch WPS Spreadsheet and open the workbook containing your daily records.
  2. 2. Select Output Cell: Click on the cell in your master tab where you want the consolidated counts to appear.
  3. 3. Input Multi-Sheet Formula: Use the compatible formula `=SUMPRODUCT(COUNTIF(INDIRECT("'"&SheetList&"'!Range"), Criteria))` to target your sheets.
  4. 4. Calculate Data: Press Enter to instantly view your aggregated data calculated across all tabs.
Fully compatible with Microsoft Excel (.xlsx) formats and complex formulasSupports standard COUNTIF, SUMPRODUCT, and INDIRECT formulas for multi-sheet trackingLightweight, fast, and completely free to useBuilt-in function wizard for easier formula entry and debugging
microsoft office alternative - wps office

Frequently Asked Questions

Can I use COUNTIF directly with a 3D reference like Sheet1:Sheet3!A1:A10?

No, the standard COUNTIF function does not natively support 3D references across multiple sheets. You must use array formulas combining functions like SUMPRODUCT and INDIRECT, or utilize newer functions like TOCOL and GROUPBY to aggregate data across sheets.

What does the TOCOL function do in the recommended Excel 365 formula?

The TOCOL function transforms a specified array or multi-sheet range into a single continuous column. By using `TOCOL(Sheet2:Sheet4!A2:A100, 1)`, the formula extracts all data across those sheets into one column while ignoring empty cells (triggered by the '1' argument).

Why is my INDIRECT formula returning a #REF! error when counting multiple sheets?

This error usually occurs if the sheet names in your reference list contain spaces or special characters but aren't properly wrapped in single quotes within the formula. Ensure your formula syntax correctly includes quotes, such as `INDIRECT("'"&CellRef&"'!Range")`.