bedevilnslay
New Member
- Joined
- Jan 29, 2013
- Messages
- 2
A | B | C | |
1 | k1 | 1 | |
2 | k2 | 1 | |
3 | k3 | 1 | |
4 | k4 | 1 | |
5 | P1 | 10 | 1 |
6 | P2 | 5 | 1 |
7 | P3 | 2 | 1 |
8 | P4 | 1 | 30 |
<tbody>
</tbody>
A | B | |
1 | K1 | P1 |
2 | k1 | P3 |
3 | k1 | P4 |
4 | k2 | P2 |
5 | k2 | P3 |
6 | k3 | P2 |
7 | k3 | P4 |
<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?