Need help with Conditional Sumproduct function

bedevilnslay

New Member
Joined
Jan 29, 2013
Messages
2
ABC
1k11
2k21
3k31
4k41
5P1101
6P251
7P321
8P4130

<tbody>
</tbody>
AB
1K1P1
2k1P3
3k1P4
4k2P2
5k2P3
6k3P2
7k3P4

<tbody>
</tbody>

Here's my problem, I got two spread sheet that First one (Lets name it tbl1) suppose to contain value for each individual item. However due to the reason that some of them suppose to be the sum of other item in the same sheet, I have the second sheet (tbl2) which contains the combination of those group.

I'm trying to avoid using micro or VBA since it's not for my own, So I need a formula to just copy and past to those group item in tbl1 to get the total sumproduct of those combination defined by condition from tbl2 but using the value from tbl1. For column C of those grouped item, it will always be 1.

The end result should be

B1 = 10 x 1 + 2 x 1 + 1 x 30
B2 = 5 X 1 + 2 X 1
B3 = 5 X 1 + 1 X 30


I tried to use
=SUMPRODUCT(B1:B8,C1:C8,A1:A8=VLOOKUP(A1,'tbl2'!A1:B7,2,FALSE))

But the result end up as 0 which frustrate me.
I guess the problem might be vlookup can't return an array instead of the first value.
Could someone help me on this please?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
OK, I have so far manage to get part of the result rather than 0 now.
with
SUMPRODUCT((ARRAY1=INDEX(ARRAY2,MATCH(A1,ARRAY2,0)))*B1:B8*C1:C8)
will spot the defined from tbl2 and calculate in tbl1
But FIRST RESULT ONLY,
When I put {"Name1","Name2"} to replace the INDEX, it works, but when I put index part it doesn't!!!
Not even with ctrl shift enter....
WHY??? >_<
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,962
Latest member
Fenes

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