Function Problems

How to Use SUMPRODUCT, SUMIF, and INDIRECT Across Multiple Excel Sheets

John WilsonJohn Wilson Oct 29, 2026 868 views

Question details

The user wants to sum matching employee values across multiple worksheets dynamically using a single formula instead of manually adding a formula for every sheet.

How to Sum Values Across Multiple Sheets using SUMPRODUCT, SUMIF, and INDIRECT
Product
Microsoft Excel
Device & OS
not provided
Scenario
Calculating conditional sums across multiple worksheets based on specific criteria using a master summary sheet.
Observed behavior
The user needs to construct a nested formula using SUMPRODUCT, SUMIF, and INDIRECT, ensuring proper syntax for worksheet references that might contain spaces.
Before you start

Create a list of all your worksheet names in a specific column on your summary sheet to easily reference them with the INDIRECT function. Ensure the worksheet names in your list match the actual sheet tabs exactly.

Solution 1Recommended

Combine SUMPRODUCT, SUMIF, and INDIRECT for 3D Summing

Use a nested formula to dynamically search and sum values across listed worksheets without manually linking each sheet.

By combining SUMPRODUCT, SUMIF, and INDIRECT, you can create a powerful array formula that evaluates criteria across multiple sheets simultaneously. The INDIRECT function converts your list of sheet names into actual references, SUMIF calculates the conditional sum for each sheet, and SUMPRODUCT adds the results together.

1
Prepare the sheet name list

In your summary sheet, create a list of the exact sheet names you want to sum across. For example, type the sheet names in cells G2 and G3.

2
Construct the INDIRECT reference

Inside the SUMIF function, use INDIRECT to reference the sheet names. If your criteria range is B4:B1000, write INDIRECT("'"&$G$2:$G$3&"'!B4:B1000"). Note the single quotes inside the double quotes to handle sheet names with spaces.

3
Add criteria and sum range

Complete the SUMIF by adding your search criterion (e.g., cell A2) and the sum range. The nested SUMIF should look like SUMIF(INDIRECT("'"&$G$2:$G$3&"'!B4:B1000"), A2, INDIRECT("'"&$G$2:$G$3&"'!BU4:BU1000")).

4
Wrap in SUMPRODUCT

Finally, wrap the entire SUMIF formula in SUMPRODUCT to add the arrays together: =SUMPRODUCT(SUMIF(INDIRECT("'"&$G$2:$G$3&"'!B4:B1000"),A2,INDIRECT("'"&$G$2:$G$3&"'!BU4:BU1000"))).

Combine SUMPRODUCT, SUMIF, and INDIRECT for 3D Summing
Syntax check: Be careful with the punctuation. Do not include spaces around the apostrophes and exclamation mark within the quotation marks. Use "'" instead of " ' " and "'!" instead of " ' ! ".
Use WPS Spreadsheet for Advanced Formulas

Sum Across Multiple Sheets Easily in WPS Office

WPS Spreadsheet fully supports complex array formulas like SUMPRODUCT, SUMIFS, and INDIRECT, offering a seamless experience for organizing and calculating data across multiple worksheets.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the workbook containing your multiple data sheets and summary sheet.
  2. 2. Navigate to the summary sheet: Go to the master summary sheet where you want to display the consolidated totals.
  3. 3. Enter the nested formula: Type the =SUMPRODUCT(SUMIF(INDIRECT(...))) formula into the target cell, referencing your specific list of sheet names and data ranges.
  4. 4. Calculate the result: Press Enter. WPS Spreadsheet will instantly calculate and return the summed values matching your criteria across all specified sheets.
Fully compatible with Microsoft Excel formula syntax.Handles multi-sheet 3D references and nested arrays effortlessly.Provides intuitive formula auto-completion and error checking.Free, lightweight, and easy to use on any device.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my INDIRECT formula returning a #REF! error across sheets?

This usually happens if the sheet names in your reference list do not exactly match the actual worksheet names, or if the sheet names contain spaces and you forgot to wrap the INDIRECT reference strings in single apostrophes (e.g., "'"&$G$2&"'!A1").

Can I use SUMIFS instead of SUMIF with INDIRECT across multiple sheets?

Yes, you can replace SUMIF with SUMIFS if you need to evaluate multiple criteria. The structure remains the same, but you will wrap the SUMIFS function inside SUMPRODUCT and use INDIRECT for each criteria range and the sum range.

Do I need to use an array formula (Ctrl+Shift+Enter) for this combination?

No, because the SUMPRODUCT function is specifically designed to handle arrays natively. You can simply press Enter after typing the formula.

How do I handle new sheets being added dynamically?

You should define your sheet name list as a dynamic named range or format it as a Table. As you add new sheet names to the list, the INDIRECT formula will automatically include them in the calculation without needing manual updates.