GoodDaySir0
New Member
- Joined
- Feb 18, 2016
- Messages
- 3
I'm trying to perform a vlookup to display any and all values associated with the lookup value. See example below:
What I have: Book1.xlsx - Sheet1
[TABLE="width: 200"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Results[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Won[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Won[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]Lost[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Tied[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Won[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Lost[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]Tied[/TD]
[/TR]
</tbody>[/TABLE]
What I want: Book2.xlsx - Sheet1
[TABLE="width: 400"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Won[/TD]
[TD]Tied[/TD]
[TD]Won[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Won[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]Lost[/TD]
[TD]Tied[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Lost[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here's the formula I've been using (plugging into B2 on Book2 and hitting CTRL+SHIFT+ENTER):
{=INDEX([Book1.xlsx]Sheet1!$A$2:$B$8,SMALL(IF([Book1.xlsx]Sheet1!$A$2:$B$8=$A2,ROW([Book1.xlsx]Sheet1!$A$2:$B$8)-1),COLUMNS($B2:B2)),2)}
The problem I'm running into is that my Book1 has about 1,000,000 rows of data and my Book2 has about 500,000 IDs. Also one single ID can have up to about 20 results. When I run this formula for more than 5 cells at a time, I get the error message saying excel ran out of resources while attempting to calculate one or more formulas.
Is there a better way of displaying all the results for each ID within a single row (per ID)?
Thanks!
What I have: Book1.xlsx - Sheet1
[TABLE="width: 200"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Results[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Won[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Won[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]Lost[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Tied[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Won[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Lost[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]Tied[/TD]
[/TR]
</tbody>[/TABLE]
What I want: Book2.xlsx - Sheet1
[TABLE="width: 400"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[TD]Results[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Won[/TD]
[TD]Tied[/TD]
[TD]Won[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Won[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]Lost[/TD]
[TD]Tied[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Lost[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here's the formula I've been using (plugging into B2 on Book2 and hitting CTRL+SHIFT+ENTER):
{=INDEX([Book1.xlsx]Sheet1!$A$2:$B$8,SMALL(IF([Book1.xlsx]Sheet1!$A$2:$B$8=$A2,ROW([Book1.xlsx]Sheet1!$A$2:$B$8)-1),COLUMNS($B2:B2)),2)}
The problem I'm running into is that my Book1 has about 1,000,000 rows of data and my Book2 has about 500,000 IDs. Also one single ID can have up to about 20 results. When I run this formula for more than 5 cells at a time, I get the error message saying excel ran out of resources while attempting to calculate one or more formulas.
Is there a better way of displaying all the results for each ID within a single row (per ID)?
Thanks!