Vlookup and Sum across multiple tabs

tfowlerusa

New Member
Joined
Mar 28, 2017
Messages
13
I have a “Master Parts List” sheet where Part Numbers start in A2 and Part Description starting in B2. I have ~ 25 Sheets each with a different name where there are columns in each. I want to match the Part Number & Description to the Master Part List and sum the total Quantity of parts from E6:E90 from each tab to the corresponding Part Number in the Master Parts List tab. I was trying the following formula but getting #NAME error. I got this from another thread just can't seem to get it to work.


=SUMPRODUCT(SUMIFS(INDIRECT("'"&SHEETS&"'!'E6:E60"),INDIRECT("'"&SHEETS&"'!B6:B90"),A2,INDIRECT("'"&SHEETS&"'!C6:C90"),B2))

Master Parts List : A2 = Part Numbers
B2 = Part Description
C2 = Quantity

Sheet 1 OMCTS : B6:B90 = Part Number
C6:C90 = Description
E6:E90 = Quantity
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
That should be:

=SUMPRODUCT(SUMIFS(INDIRECT("'"&SHEETS&"'!E6:E90"),INDIRECT("'"&SHEETS&"'!B6:B90"),A2,INDIRECT("'"&SHEETS&"'!C6:C90"),B2))


Does this succeed?
 
Upvote 0
Assuming part numbers are unique
The relevant sheet names are in the range named Sheets.


Excel 2010
ABCD
1Part NumberDescriptionQuantity
212ABC1212
3
1a
Cell Formulas
RangeFormula
C2=SUMPRODUCT(SUMIF(INDIRECT("'"&Sheets&"'!B6:B90"),A2,INDIRECT("'"&Sheets&"'!E6:E90")))
D2=SUMPRODUCT(SUMIFS(INDIRECT("'"&Sheets&"'!E6:E90"),INDIRECT("'"&Sheets&"'!B6:B90"),A2,INDIRECT("'"&Sheets&"'!C6:C90"),B2))
Named Ranges
NameRefers ToCells
Sheets='1a'!$L$1:$L$2
 
Last edited:
Upvote 0
Part numbers are unique. I tired the formula and got #NAME ? error. I am not sure the the Workbook Defined Names are, is this something I need to add for the formula to work?
 
Upvote 0
Part numbers are unique. I tired the formula and got #NAME ? error. I am not sure the the Workbook Defined Names are, is this something I need to add for the formula to work?

SHEETS must refer to a range housing the relevant sheet names. Have a look in the Name Box or in the Name Manager to see whether you have such a name. If not, create it.
 
Upvote 0
I defined names and pasted the formula, now I am getting a #REF ! error.

='Master Parts List'!$G$2:$G$26 ( where I put all the names of each sheet as described)
 
Upvote 0
I defined names and pasted the formula, now I am getting a #REF ! error.

='Master Parts List'!$G$2:$G$26 ( where I put all the names of each sheet as described)

Select the range

$G$2:$G$26

in Master Parts List. Go to the Name Box the outer left side of the formula bar and type SHEETS.

Once done so, the formula you have (edited for a small error), i.e.

=SUMPRODUCT(SUMIFS(INDIRECT("'"&SHEETS&"'!E6:E90"),INDIRECT("'"&SHEETS&"'!B6:B90"),A2,INDIRECT("'"&SHEETS&"'!C6:C90"),B2))

should work as intended.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top