Thread: Sumproduct
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Sumproduct

Add a helper column C to Table 1, insert this formula in C2:
=VLOOKUP(A2,Table2!A:B,2,FALSE)

Drag it down to C5 (or as it's necessary)!

Create Table 3:
Groups Sales by group
G_1 14(formula here)
G_2 7

Insert in B2:
=SUMPRODUCT(--(Table1!$C$2:$C$5=A2),Table1!$B$2:$B$5)
Drag it down as necessary!

Regards,
Stefi

€žOscar€ť ezt Ă*rta:

I have two tables:

Table 1:
Item Sales
I_1 5
I_2 7
I_1 3
I_3 6

Table 2:
Item Group
I_1 G_1
I_2 G_2
I_3 G_1

I have no problem to calculate sales of certain item
=SUMPRODUCT(--(A1:A5="I_1");B1:B5). But I dont know how to calculate sales of
items from certain group. I dont want to manipulate table 1 because I get one
table like this every day. Any help appreciated.