One to Many lookup quandry

Jlewis30

New Member
Joined
Dec 17, 2013
Messages
2
Greetings,

I have a long list of Account IDs and "interests" that I need to use to validate data in another table, by that Account ID. For any given Account ID I can have from one to 15 Interests associated.

If I use vlookup I am only going to get the first match, but I need to report all of the interests of Contacts associated with each ID (in a single cell, preferably). I am wondering if there is a simple(ish) way that I can concatenate any Interest that matches the Account ID of a Contact in my table.

ContactAccount IDInterests
Jillabc1234Jazz, Rock, Swing
Jackdef5678Swing, Bluegrass

<tbody>
</tbody>

Account IDInterest
abc1234Jazz
abc1234Rock
abc1234Swing
def5678Swing
def5678Bluegrass

<tbody>
</tbody>

I am about to get all crazy bad and use subtotals to transpose columns to rows (MANUALLY) and create the concatenated result in my lookup table, but it is like 150,000 rows. I want to either automate creating the combined lookup table, or figure out how to get a "one to many" lookup.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
ContactAccount IDInterests
Jillabc1234Jazz Rock Swing=COUNTA(C2:E2)
Jackdef5678Swing Bluegrass =COUNTA(C3:E3)
List of Account ID'sList of Interests
=VLOOKUP(G6,B$2:E$3,COUNTIF(G6:G$6,G6)+1,FALSE)=B2
=VLOOKUP(G7,B$2:E$3,COUNTIF(G$6:G7,G7)+1,FALSE)=IF(((VLOOKUP(G6,B$2:F$3,5,FALSE))>(COUNTIF(G$6:G6,G6))),G6,INDIRECT("B"&MATCH(G6,B$2:B$3,1)+ROW($B$2)))
=VLOOKUP(G8,B$2:E$3,COUNTIF(G$6:G8,G8)+1,FALSE)=IF(((VLOOKUP(G7,B$2:F$3,5,FALSE))>(COUNTIF(G$6:G7,G7))),G7,INDIRECT("B"&MATCH(G7,B$2:B$3,1)+ROW($B$2)))
=VLOOKUP(G9,B$2:E$3,COUNTIF(G$6:G9,G9)+1,FALSE)=IF(((VLOOKUP(G8,B$2:F$3,5,FALSE))>(COUNTIF(G$6:G8,G8))),G8,INDIRECT("B"&MATCH(G8,B$2:B$3,1)+ROW($B$2)))
=VLOOKUP(G10,B$2:E$3,COUNTIF(G$6:G10,G10)+1,FALSE)=IF(((VLOOKUP(G9,B$2:F$3,5,FALSE))>(COUNTIF(G$6:G9,G9))),G9,INDIRECT("B"&MATCH(G9,B$2:B$3,1)+ROW($B$2)))

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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