Count multiple names, combined with VLOOKUP

lawrence24

New Member
Joined
Dec 31, 2013
Messages
21
Hello!

This is some sample data:

Sheet 1:

NameTotal
Jackson
Amy
Meghan

<tbody>
</tbody>


Sheet 2:

Header 1Header 2Header 3Header 4Header 5Header 6Header 7
OrangesXTPC
201HondaJackson
Apples
PPTC111ToyotaJackson
PineapplesLTPC120MazdaAmy
BananasYRGH600AudiMeghan

<tbody>
</tbody>


What I'm trying to do is calculate the total values in Header 3, 4 & 5 for each name.

So the table in Sheet 1 should be:

NameTotal
Jackson6
Amy3
Meghan6

<tbody>
</tbody>

I can't figure out how to loop over VLOOKUP through the sheet, to match all instances of the names in Sheet 1!

Please help!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Use a SUMPRODUCT:

=SUMPRODUCT(Sheet2!$C$2:$E$5*(Sheet2!$G$2:$G$5=Sheet1!A2))
 
Upvote 0
That works! But one thing - I don't always know how big the table is going to be vertically. It could be G40, it could be G90. How do I account for this?
 
Upvote 0
Hi! Thanks for the suggestions - but please could you tell me how to? I'm not any good with this stuff!
 
Upvote 0
Just make it big enough to always be big enough. Say go down to row 1000 with the formula. That assumes there is no data below the table.
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,407
Members
448,894
Latest member
spenstar

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