Sumproduct will probably work
in your 4th column enter
=sumproduct(--(sheet2!$a$1:$a$100=a1),--(sheet2!$b$1:$b$100=b1),--($C$1:C100=C1),sheet2!$D$1:$D$100)
for the count and
=sumproduct(--(sheet2!$a$1:$a$100=a1),--(sheet2!$b$1:$b$100=b1),--($C$1:C100=C1),sheet2!$E$1:$E$100)
Change the columns as necessary for your workbook.
the "--(" changes the logical true false to 1,0
"Mo" wrote:
I am having trouble with a index and match function.
My data on first tab (sheet 1) has the following:
A 1 f
B 2 g
C 3 h
I want to add a fourth column that is pulled from the second tab (sheet 2).
The data on the second tab
A 1 f 2 $100,000
c 3 h 17 $410,000
Note the first sheet has all of the possible categories (65 different ones).
The second sheet only has catagories where the count and $ are populated (35
of total possible 65). I have tried the index and match, but am having
trouble because I have three variables to look up.
Any thoughts? thanks
|