SUMPRODUCT function using columns that match criteria across different sheets

DotAGenius

New Member
Joined
Jan 9, 2019
Messages
7
Hi all!

First time posting here.

I am trying to produce a spreadsheet to see an array of "Weighted Scores" based on different criteria.
If anybody plays FIFA, this might be easier to understand.

Players have "Attributes" like Shooting, Passing, Defending, and Dribbling.
You can assign "Styles" to players that give bonuses like +15 to Shooting, +20 to Defending, or +10 to both Shooting and Passing, etc.
I also created "Archetypes," such as a "Wing Player" who would benefit from having good Shooting and Passing, but not so much from Defending.

On the first sheet, I have a list of Players and all their Attributes. For example, it would look like this:
Player APlayer BPlayer CPlayer D
Shooting80709050
Passing80907050
Defending20205090
Dribbling40202050

<tbody>
</tbody>

On the second sheet, I list out what the Styles do. For example, it would look like this, to indicate what bonuses each Style gives (e.g. applying Style Z to a Player would give them +20 to Dribbling):
Style WStyle XStyle YStyle Z
Shooting15000
Passing01000
Defending00150
Dribbling55020

<tbody>
</tbody>


On the third sheet, I list out the Archetypes and how important different Attributes are for each respective Archetype (out of 1.00). For example, it would look like this:
Archetype 1Archetype 2Archetype 3Archetype 4
Shooting0.500.50
Passing0.50.6500
Defending0000.8
Dribbling00.350.50.2

<tbody>
</tbody>

Phew, ok! So now that all that's out of the way, this is what I hope to accomplish.

I want to be able to quickly determine the best Style/Archetype combination for every Player based on Weighted Scores for each combination. So far, I have been manually selecting each Archetype and each Style and comparing them using drop-down lists and SUMPRODUCT. For example, Player A with Style W equipped and playing as Archetype 1 would be the SUMPRODUCT of (the Array under Player A + Array under Style W (to get total Attributes)) * (the Array under Archetype 1) to get one Weighted Score. In this case, it would be [95,80,20,45] * [0.5,0.5,0,0] to get a Weighted Score of 241.

On my fourth sheet, this is what I have (with A1 being a drop-down list of all Players):
Player 1Archetype 1Archetype 2Archetype 3Archetype 4
Style W241
Style X
Style Y
Style Z

<tbody>
</tbody>

I want to see the Weighted Score per each Style/Archetype combination, so I can quickly determine how this Player is best utilized.
The problem I am facing is finding a way to locate the Attributes for the Player selected from the list in A1, and then using that as the first part of the first Array.
I tried to do some sort of SUMPRODUCT function with MATCH, but I couldn't figure out how to do it in a robust manner.

If anybody has a solution, I would be extremely grateful!

Thank you in advance!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Welcome to Mr Excel forum

I don't understand how did you get 241 for Player A, Style W, Archetype 1 (???)

Shouldn't it be
[95,80,20,45] * [0.5,0.5,0,0] =
95*0.5 + 80*0.5 + 20*0 + 45*0 =
47.5 + 40 + 0 + 0 = 87.5

Could you clarify?

M.
 
Last edited:
Upvote 0
Hello Marcelo,

Yes you are right, that was a typo. The Weighted Score should be, as you said, 87.5.

Thanks!
 
Upvote 0
Assuming Tables 1, 2 and 3 are in columns A:E of their respective sheets, headers in row 1, try this

Sheet4

A
B
C
D
E
1
Player A​
Archetype 1​
Archetype 2​
Archetype 3​
Archetype 4​
2
Style W​
87,5​
67,75​
70​
25​
3
Style X​
85​
74,25​
62,5​
25​
4
Style Y​
80​
66​
60​
36​
5
Style Z​
80​
73​
70​
28​

<tbody>
</tbody>

Player A in A1

Formula in B2 copied across and down
=SUMPRODUCT(INDEX(Sheet1!$B$2:$E$5,0,MATCH($A$1,Sheet1!$B$1:$E$1,0))+INDEX(Sheet2!$B$2:$E$5,0,MATCH($A2,Sheet2!$B$1:$E$1,0)),INDEX(Sheet3!$B$2:$E$5,0,MATCH(B$1,Sheet3!$B$1:$E$1,0)))

Hope this helps

M.
 
Last edited:
Upvote 0
Hi Marcelo,

I am excited because this is very close to what I'm looking for and I understand the concept. However, I am getting the error message: Function ADD parameter 1 expects number values. But 'Player A' is a text and cannot be coerced to a number.
Should I be offsetting all the rows by 1?

Much thanks!
 
Upvote 0
The formula worked perfectly for me.
Have you checked the sheet names (Sheet1, Sheet2, Sheet3)?
Also check the data location on each sheet - columns A:E, headers i row 1.

I didn't understand the error message you received. Could you tell us exactly the wording of such message?

M.
 
Upvote 0
Hi Marcelo,

Turns out I had accidentally set the start of the arrays for the sumproduct at B1 instead of B2. I just changed those and it worked, thanks again!
 
Upvote 0
Hi Marcelo (or anybody),

I've run into an issue that I overlooked.
So when adding up the original Player's Attributes from Table 1 and the additional Attributes from the Styles in Table 2, how can I put an upper limit of 99 for the SUMPRODUCT?

So if Player A had 90 in Shooting instead of 80, the SUMPRODUCT should not be [105,80,20,45] * [0.5,0.5,0,0] but rather [99,80,20,45] * [0.5,0.5,0,0].

Thank you in advance!
 
Upvote 0
Hi Marcelo (or anybody),

I've run into an issue that I overlooked.
So when adding up the original Player's Attributes from Table 1 and the additional Attributes from the Styles in Table 2, how can I put an upper limit of 99 for the SUMPRODUCT?

So if Player A had 90 in Shooting instead of 80, the SUMPRODUCT should not be [105,80,20,45] * [0.5,0.5,0,0] but rather [99,80,20,45] * [0.5,0.5,0,0].

Thank you in advance!

To attend this new requirement you need a more complex formula.

Try
Array formula in Sheet4 B2 copied across and down
=SUM(IF(INDEX(Sheet1!$B$2:$E$5,0,MATCH($A$1,Sheet1!$B$1:$E$1,0))+INDEX(Sheet2!$B$2:$E$5,0,MATCH($A2,Sheet2!$B$1:$E$1,0))>99,99,INDEX(Sheet1!$B$2:$E$5,0,MATCH($A$1,Sheet1!$B$1:$E$1,0))+INDEX(Sheet2!$B$2:$E$5,0,MATCH($A2,Sheet2!$B$1:$E$1,0)))*INDEX(Sheet3!$B$2:$E$5,0,MATCH(B$1,Sheet3!$B$1:$E$1,0)))

confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

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