Help w/SUMPRODUCT with Three Arrays/Conditions/AND

GreganDunn

New Member
Joined
Jan 7, 2017
Messages
12
I'm pretty sure that SUMPRODUCT is the solution to my problem here. I'm new to the SUMPRODUCT formula and fully understand it's basics and straight forward usage, however my SUMPRODUCT usage/requirement is a little more complex are I'm struggling with finding the right syntax to make things work for me.

I'm attempting to create a new data set that lists the FRAGMENTS (or components) needed for a given UPGRADE based on the ITEM (items are composed of fragments) requirements for an upgrade and the RECIPE of the FRAGMENTS to create an ITEM.

I have an insane spreadsheet to plug this into, but I've narrowed it down and simplified it to the attached spreadsheet. The whole vertical/horizontal array thing is screwing me up in my specific example.

Thanks for taking the time to have a peak at my challenge, I really appreciate it!


Example File: https://www.dropbox.com/s/rqwq372hs2ome35/Upgrade Item to Fragments.xlsx?dl=0

Screenshot:

Screen%20Shot%202018-07-19%20at%208.31.07%20PM_zpso04qzyb5.png
 
Last edited:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Instead of just "there it is and solve it", please try to help the helper...

Why is S5 2 if it is there where you need a formula?
 
Upvote 0
Of course I will try and help the helper, I gave as much information as I had and I'm here to help solve the problem.

I manually calculated the answers that I want in this simple set of data. My actual data set is MUCH larger and would be a severe amount of work to solve manually and I'd like the spreadsheet to be dynamic.
 
Upvote 0
Of course I will try and help the helper, I gave as much information as I had and I'm here to help solve the problem.

I manually calculated the answers that I want in this simple set of data. My actual data set is MUCH larger and would be a severe amount of work to solve manually and I'd like the spreadsheet to be dynamic.

How does 2 of S5 obtain?
 
Upvote 0
If you replace the blanks with zeroes:


Excel 2010
RSTU
1Character Fragment Upgrade Requirements
2Upgrade 1Upgrade 2Upgrade 3
3Fragment1100
4Fragment2003
5Fragment3220
6Fragment4323
7Fragment5101
8Fragment6200
9Fragment7020
10Fragment8210
11Fragment9021
12Fragment10011
13TRYING TO SOLVE FOR THESE CELLS ABOVE
Sheet1 (2)
Cell Formulas
RangeFormula
S3:U12{=MMULT(TRANSPOSE($G$3:$P$11),$B$3:$D$11)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
This works also as a single cell copied across/down without having to convert the blanks:


Excel 2010
RSTU
1Character Fragment Upgrade Requirements
2Upgrade 1Upgrade 2Upgrade 3
3Fragment1100
4Fragment2003
5Fragment3220
6Fragment4323
7Fragment5101
8Fragment6200
9Fragment7020
10Fragment8210
11Fragment9021
12Fragment10011
13TRYING TO SOLVE FOR THESE CELLS ABOVE
Sheet1 (3)
Cell Formulas
RangeFormula
S3=SUMPRODUCT(INDEX($G$3:$P$11,,ROW(A1)),INDEX($B$3:$D$11,,COLUMN(A1)))


or just =SUMPRODUCT(INDEX($G$3:$P$11,,ROW(A1)),B$3:B$11)
 
Last edited:
Upvote 0
This works also as a single cell copied across/down without having to convert the blanks:

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]S3[/TH]
[TD="align: left"]=SUMPRODUCT(INDEX($G$3:$P$11,,ROW(A1)),INDEX($B$3:$D$11,,COLUMN(A1)))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

AMAZING! Totally works. Can you help me understand the logic that is taking place?
 
Upvote 0
Wish I could edit my posts to avoid multiple posts...

The question I have to help me understand this better, is how does the INDEX function refer to the "Upgrade", "Fragment" or "Item" columns as it's currently written? I.e how is it properly doing the multiplications?
 
Upvote 0
You're just multiplying each fragment column by each upgrade column and finding the sum. The second table has fragments in a row instead of a column so you also have to transpose.

Index returns the nth column of the second table. You actually don't need it for the first table since the upgrade #s are already in columns. See the simpler formula I posted above: =SUMPRODUCT(INDEX($G$3:$P$11,,ROW(A1)),B$3:B$11)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,532
Messages
6,172,875
Members
452,486
Latest member
standw01

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