SUMPRODUCT(SUMIF(INDIRECT Formula not working

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Can anyone tell me why the formula in column C on the summary tab does not work? I am adding the summary sheet and one of 4 of the worksheets.
PickKitVer1.xlsm
ABC
1FruitSum of Sales in all regions (Manually type the worksheet name)Sum of Sales in all regions (Using Ref Sheet)
2Panel Build2#N/A
3664X33D11#N/A
4GLS-142075-AS10#N/A
5LC-16474310#N/A
6C/146132/MC/2011#N/A
7M/50/LSU/CP7#N/A
8Enclosure #18#N/A
9Enclosure #28#N/A
10Enclosure #35#N/A
11FEN20-16DXP
12RSM RKM 461-3M/S3059
13RSSD RSSD 441-5M
Summary
Cell Formulas
RangeFormula
B2:B10B2=SUMPRODUCT(SUMIF(INDIRECT("'"&{"KIT0041","KIT0042","KIT0001"}&"'!$B$10:$B$37"),A2,INDIRECT("'"&{"KIT0041","KIT0042","KIT0001"}&"'!$D$10:$D$37")))
C2:C10C2=SUMPRODUCT(SUMIF(INDIRECT("'"&RefSheet!$B$3:$B$7&"'!$A$2:$A$10"),A2,INDIRECT("'"&RefSheet!$B$3:$B$9&"'!$D$2:$D$10")))
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,547
Office Version
  1. 365
Platform
  1. Windows
How about
=SUMPRODUCT(SUMIF(INDIRECT("'"&Refsheet!$B$3:$B$5&"'!$B$7:$B$37"),A2,INDIRECT("'"&Refsheet!$B$3:$B$5&"'!$D$10:$D$37")))
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,388
Office Version
  1. 365
Platform
  1. Windows
=SUMPRODUCT(SUMIF(INDIRECT("'"&RefSheet!$B$3:$B$7&"'!$A$2:$A$10"),A2,INDIRECT("'"&RefSheet!$B$3:$B$9&"'!$D$2:$D$10")))

In this one your RefSheet ranges are different sizes. You cant do that. You will get na.

Lets say you change it to B3:B7. All of those cells must have a valid sheet name in them. None can be empty.
 

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows
I am actually getting a number but it is not the right number
 

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows
How about
=SUMPRODUCT(SUMIF(INDIRECT("'"&Refsheet!$B$3:$B$5&"'!$B$7:$B$37"),A2,INDIRECT("'"&Refsheet!$B$3:$B$5&"'!$D$10:$D$37")))
I am actually getting a number but it is not the right number
 

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

I am actually getting a number but it is not the right number
When i insert the formula you supplied
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,547
Office Version
  1. 365
Platform
  1. Windows
How many sheet names do you have on the refsheet?
 

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

1587665244550.png
 

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows
There will be more sheets added in many cases
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,547
Office Version
  1. 365
Platform
  1. Windows
Ok, how about
=SUMPRODUCT(SUMIF(INDIRECT("'"&Refsheet!$B$3:$B$8&"'!$B$10:$B$37"),A2,INDIRECT("'"&Refsheet!$B$3:$B$8&"'!$D$10:$D$37")))
 

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Ok, how about
=SUMPRODUCT(SUMIF(INDIRECT("'"&Refsheet!$B$3:$B$8&"'!$B$10:$B$37"),A2,INDIRECT("'"&Refsheet!$B$3:$B$8&"'!$D$10:$D$37")))

1587665413609.png


This is the result from that formulaa
 

Watch MrExcel Video

Forum statistics

Threads
1,129,536
Messages
5,636,887
Members
416,947
Latest member
asher_nk

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
Top