3D Sumproduct not working

Carys

New Member
Joined
Jan 21, 2019
Messages
1
Hi everyone,

I have multiple worksheets (Sheet2, Sheet3, etc.) with values in columns B and C that I want to summarise in Sheet1.

I am trying to use a 3D sumproduct function, but it is not working - I'm just getting the #VALUE ! error. I don't have a coding background and have tried cobbling together various formulae and methods, and am just not getting the result I need.

Basically, in Sheet1 I have a list of 100 employee names in column A. Next to each employee name, in column B, I want the total number of days listed against that employee across multiple worksheets. In Sheet2, Sheet3, etc., there are 2 random employee names listed in column B, and their corresponding number of days listed in column C.

Here is the formula I currently have in cell B2 of Sheet1 (to get the total for the first employee, whose name is in cell A2 of Sheet1): =SUMPRODUCT(INDIRECT("'"&Sheets&"'!"&"B2:B3"),"*"&A2&"*",INDIRECT("'"&Sheets&"'!"&"C2:C3"))

- Sheets is the named range comprising of the worksheet names, which is itself derived from =INDEX(Sheetlist, ROW()) where Sheetlist is a Name created with the code =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1))," ")

- B2:B3 is the range for the criteria (employee name) in Sheet2, Sheet3, etc.

- C2:C3 is the range for the values of interest (number of hours) in Sheet2, Sheet3, etc.

- A2 is the cell in Sheet1 that has the employee's name for which I want the formula to return the total number of days.

I would like to use formulae that allow for the totals to be easily updated as more sheets are added.

Thank you in advance for any help you can give.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try

=SUMPRODUCT(SUMIF(INDIRECT("'"&Sheets&"'!A$1:A$100"),A1,INDIRECT("'"&Sheets&"'!B$1:B$100")))
Copy down the column

Suggest you use a different named range other than Sheets to be safer, maybe call it tabs or Rng or something.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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