How to VLOOKUP and SUM Across Multiple Sheets in Excel

 

The sample sheets are for 3 consecutive months: January, February, and March, containing the Product Name, Product ID, and Sales for each month. We will see how to apply the VLOOKUP function for a value and get the result as the sum of the sales for 3 months.

Excel vlookup and sum across multiple sheets Dataset


Method 1 – Use VLOOKUP and SUM Functions Across Multiple Sheets

Steps:

  • Select cell C5 and insert the following formula.
=SUM(VLOOKUP(B5,January!$B$5:$D$9,{3},FALSE),VLOOKUP(B5,February!$B$5:$D$9,{3},FALSE),VLOOKUP(B5,March!$B$5:$D$9,{3},FALSE))

Using the VLOOKUP and SUM Functions Across Multiple Sheets

Formula Description:

  • In the VLOOKUP function, we are looking up for Product Name in cell B5.
  • We have added all the 3 sheets’ table ranges.
  • The column index for the dataset for all the 3 sheets is 3 as we want the result of sales, which is in the D column, which is third in the range.
  • We wanted an exact match, so we put FALSE. You can use TRUE in case you want an approximate match.
  • The SUM function provides the sum of the matched items.
  • Hit the Enter button and utilize the AutoFill tool to the entire column.

Read More: How to Use VLOOKUP Function with Exact Match in Excel


Method 2 – VLOOKUP and Sum Across Multiple Sheets Applying SUMPRODUCT, SUMIF, and INDIRECT Functions

Steps:

  • Write the sheet names and select them.

Vlookup and Sum Across Multiple Sheets Applying the SUMPRODUCT, SUMIF, and INDIRECT Functions

  • Click on the Define Name from the Formulas tab.

  • Write “Months” in the Name section.
  • Check the range in Refers to: and click OK.

  • Insert the formula below in cell C5 to get results for sales of 3 months for Product ID #1101.
=SUMPRODUCT(SUMIF(INDIRECT("'"&Months&"'!C5:C9"),$B$5,INDIRECT("'"&Months&"'!D5:D9")))

Vlookup and Sum Across Multiple Sheets Applying the SUMPRODUCT, SUMIF, and INDIRECT Functions

Formula Description:

  • The INDIRECT function returns the reference specified by a text string. For this dataset, we have used the “Months” list which we created at the beginning of the process.
  • The SUMIF function checks the range and criteria to find the desired sum.
  • The SUMPRODUCT function takes arrays and gives the sum of the products of the corresponding ranges and arrays received already.
  • Press Enter and apply the AutoFill tool to the whole column in order to get your desired output.

Excel vlookup and sum across multiple sheets

Read More: VLOOKUP with IF Condition in Excel


Things to Remember

  • You must follow the syntax of the formulas if you have a different dataset.
  • To write arguments from different sheets, you can simply click on the sheet and select the required data.
  • Formulas will get longer with the number of sheets you have in your dataset for the first method, but the second method solves that nicely.

Download the Practice Workbook


Related Readings


<< Go Back to VLOOKUP Between Worksheets | Excel VLOOKUP Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Syeda Fahima Nazreen
Syeda Fahima Nazreen

SYEDA FAHIMA NAZREEN is an electrical & electronics engineer who loves exploring Excel and VBA programming. To her, programming is a time-saving tool for dealing with data, files, and the internet. She's skilled in Proteus, MATLAB, Multisim, AutoCAD, Jupiter Notebook, and MS Office, going beyond the basics. With a B.Sc in Electrical & Electronic Engineering from American International University, Bangladesh, she's shifted gears and now works as a content developer. In this role, she creates techy content exclusively... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo