Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Extract data with helper column in Excel
  • Perform case-sensitive Lookup in Excel
  • Excel Advanced Lookup using Index and Match Functions
  • How to get last row in numeric data in Excel
  • Create hyperlink with VLOOKUP in Excel

Data Analysis Examples

  • Move chart to a separate worksheet in Excel
  • Example of COUNTIFS with variable table column in Excel
  • How to Use Solver Tool in Excel
  • Filter Data Based on Date in Excel
  • How To Remove Duplicates In Excel Column Or Row?

Data Validation Examples

  • Excel Data validation require unique number
  • Excel Data validation must begin with
  • Excel Data validation with conditional list
  • Excel Data validation allow uppercase only
  • Excel Data validation whole percentage only

3D SUMIF for multiple worksheets in Excel

by

This tutorial shows how to 3D SUMIF for multiple worksheets in Excel using the example below;

Formula

=SUMPRODUCT(SUMIF(INDIRECT
("'"&sheets&"'!"&"range"),criteria,
INDIRECT("'"&sheets&"'!"&"sumrange")))

Explanation

To conditionally sum identical ranges that exist in separate worksheets, all in one formula, you can do so with the SUMIF function + INDIRECT, wrapped in SUMPRODUCT. In the example, the formula looks like this:

=SUMPRODUCT(SUMIF(INDIRECT
("'"&sheets&"'!"&"D4:D5"),B9,
INDIRECT("'"&sheets&"'!"&"E4:E5")))

The data on each of the three sheets being processed looks like this:

Worked Example:   Get location of value in 2D array in Excel

Explanation

First of all, note that you can’t use SUMIFs with a “normal” 3D reference like this:

Sheet1:Sheet3!D4:D5
This is the standard “3D syntax” but if you try to use it with SUMIF, you’ll get a #VALUE error. So, to workaround this problem you can use a named range “sheets” that lists each sheet (worksheet tab) that you want to include. However, to build references that Excel will interpret correctly, we need to concatenate the sheet names to the ranges we need to work with and then use the INDIRECT to get Excel to recognize them correctly.

Worked Example:   Count cells that contain odd numbers in Excel

Also, because the named range “sheets” contains multiple values (i.e. its an array), the result of SUMIF in this case is also an array (sometimes called a “resultant array). So, we use SUMPRODUCT to handle it, since SUMPRODUCT has the ability to handle arrays natively without requiring Ctrl-Shift-Enter, like many other array formulas.

Worked Example:   How to check if cell contains one of many things in Excel

Alternatively;

The example above is somewhat complicated. Another way to handle this problem is to do a “local” conditional sum on each sheet, then use a regular 3D sum to add up each value on the summary tab.

To do this, add a SUMIF formula to each sheet sheet that uses a criteria cell on the summary sheet. Then when you change the criteria, all linked SUMIF formulas will update.

Post navigation

Previous Post:

3D sum multiple worksheets in Excel

Next Post:

Sum by group in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • Find function vs Search function in Excel
  • Two ways to Compare Text in Excel
  • T function: Description, Usage, Syntax, Examples and Explanation
  • TEXT function: Description, Usage, Syntax, Examples and Explanation
  • How to remove trailing slash from url in Excel
  • Roll back weekday to Friday base on a particular date in Excel
  • Convert time to time zone in Excel
  • List holidays between two dates in Excel
  • Display Days until expiration date in Excel
  • How to Calculate Age in Excel
  • VDB function: Description, Usage, Syntax, Examples and Explanation
  • NPER function: Description, Usage, Syntax, Examples and Explanation
  • NPV function: Description, Usage, Syntax, Examples and Explanation
  • AMORLINC function: Description, Usage, Syntax, Examples and Explanation
  • EFFECT function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2022 xlsoffice . All Right Reserved. | Teal Smiles