How to Use 3D SUMIF for Multiple Worksheets in Excel

The sample Excel Workbook contains three Worksheets named Jan, Feb, and March. In each sheet, the B4:D9 cells contain the Employee, Project, and Sales Volume columns respectively.

The Jan worksheet contains the dataset for January Sales Volume.

Sample dataset for the month of January including Employee, Project, Sales Volume

Feb sheet has the dataset for February Sales Volume.

Sample dataset for the month of February including employee, project, sales volume

March sheet the dataset for March Sales Volume.

Sample dataset for the month of March including employee, project, sales volume

We will summarize the sales data in the worksheet shown below.

Summary dataset to calculate the total sales from multiple worksheets using 3D SUMIF for multiple worksheets


Method 1 – Combining SUMIF, INDIRECT, and SUMPRODUCT Functions

In order to use 3D Referencing with the SUMIF you will need to combine it with the INDIRECT and SUMPRODUCT functions to sum values from multiple worksheets.

Steps:

  • Enter the following formula in cell C5.
=SUMPRODUCT(SUMIF(INDIRECT("'"&Sheets&"'!"&"C5:C9"),B5,INDIRECT("'"&Sheets&"'!"&"D5:D9")))

Formula Breakdown:

  • SUMIF(INDIRECT(“‘”&Sheets&”‘!”&”C5:C9”),B5,INDIRECT(“‘”&Sheets&”‘!”&”D5:D9”)) →Here C5:C9 is the required criteria range for each sheet to sum by, B5 is the specific criteria, D5:D9 is the same range of each sheet to sum. The Sheets function will return the sheet number and the INDIRECT function will help to return a valid reference.
  • SUMPRODUCT(SUMIF(INDIRECT(“‘”&Sheets&”‘!”&”C5:C9”),B5,INDIRECT(“‘”&Sheets&”‘!”&”D5:D9”))) →This will multiply the values of the corresponding range and return the added value of each sheet.

Formula of SUMIF, INDIRECT, SUMPRODUCT to sum data from multiple worksheet

  • Press ENTER and drag the “Fill Handle” down to fill.
  • You will get the sum value according to the criteria from multiple worksheets.

Final output 3D SUMIF for multiple worksheets after summing total sales volume for projects

Read More: How to Sum If Cell Contains Number and Text in Excel


Method 2 – Utilizing SUMIF Function for 3D Referencing from Multiple Worksheets

Steps:

  • Enter the following formula in cell C5.
=SUMIF(Jan!C5:C9,SUMIF!B5,Jan!D5:D9)+SUMIF(Feb!C5:C9,SUMIF!B5,Feb!D5:D9)+SUMIF(Mar!C5:C9,SUMIF!B5,Mar!D5:D9)

Where,

  • SUMIF(Jan!C5:C9,SUMIF!B5,Jan!D5:D9)→ In this part, the SUMIF function is summing value from range (Jan!C5:C9) with criteria from the cell (SUMIF!B5). Finally, summing the sum_range(Jan!D5:D9). Similarly, for Feb and Mar

Formula of SUMIF to sum sales volume for projects from multiple worksheets

  • Press ENTER and drag down the “Fill Handle”.
  • You will get the final result.

Final result of 3D SUMIF for multiple worksheets summing sales volume for projects


How to Apply SUMPRODUCT Function Across Multiple Sheets

Steps:

  • Enter the following formula in cell C5.
=SUM(SUMPRODUCT((Jan!C5:C9=SUMPRODUCT!B5)*(Jan!D5:D9)),SUMPRODUCT((Feb!C5:C9=SUMPRODUCT!B5)*(Feb!D5:D9)),SUMPRODUCT((Mar!C5:C9=SUMPRODUCT!B5)*(Mar!D5:D9)))

Formula of SUMPRODUCT to sum sales volume across multiple sheets

  • Press the ENTER key and drag the “Fill Handle” down.
  • You will get your desired result.

Result of SUMPRODUCT function to find the total sales of projects across multiple sheets


How to VLOOKUP and SUM Across Multiple Sheets

We have a dataset of the Sales Volume of multiple products for the month of June in a different worksheet.

Sample dataset of June sales volume containing product and sales volume

We also have the dataset for the month of July.

Sample dataset of July sales volume containing product and sales volume

Steps:

  • Enter the following formula in cell C5.
=SUM(VLOOKUP(B5,Jun!$B$5:$C$9,{2},FALSE),VLOOKUP(B5,Jul!$B$5:$C$9,{2},FALSE))

Where,

  • The VLOOKUP function will look up for values from a provided column ($B$5:$C$9) across multiple sheets.
  • The SUM function will sum up the value extracted using the VLOOKUP function.

Formula of VLOOKUP and SUM for summing sales volume from multiple sheets

  • Press ENTER and drag the “Fill Handle” down.
  • You will get the total sales volume.

Final output summing sales volume across multiple worksheets with VLOOKUP and SUM functions


Download Practice Workbook


Related Articles


<< Go Back to Excel SUMIF Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Nuraida Kashmin
Nuraida Kashmin

Nuraida Kashmin, Bachelor's degree in Mechanical Engineering from Rajshahi University of Engineering & Technology. Since 2021, she wrote 45+ articles on Excel problems and reviewed over 1000 articles. Currently working as a Project Manager, she is responsible for developing and implementing content strategies, managing writers and editors, staying updated on new technology, analyzing data, and tracking content performance indicators. Her interests include Project Management, Creative Writing, Digital Marketing, Reporting, Monitoring & Documentation, and Online Advocacy for SAP &... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo