Vlookup with multiple returns

CassieL

Board Regular
Joined
Jun 14, 2016
Messages
90
Hi everyone,

Im trying to vlookup a value from another tab (same workbook) with multiples values return vertically. Please help

For example:

Tab 1
[TABLE="class: grid, width: 50"]
<tbody>[TR]
[TD]A[/TD]
[TD]123[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]111[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]100[/TD]
[/TR]
</tbody>[/TABLE]

Tab 2
[TABLE="class: grid, width: 50"]
<tbody>[TR]
[TD]A[/TD]
[TD]123[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]111[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Please help!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi,

If your Tab 1 is named Data, you can use the array function (Ctrl+Shift+Enter) in Sheet 2 cell B2
Code:
=IF(ROWS(B$2:B2)<=COUNTIF(Data!$A$2:$A$21,$B$1),INDEX(Data!$B$2:$B$21,SMALL(IF(Data!$A$2:$A$21=$B$1,ROW(Data!$A$2:$A$21)-ROW(Data!$A$2)+1),ROWS(B$2:B2))),"")

HTH
 
Last edited:
Upvote 0
Hi James,

Thanks for replying. Im getting error on the code. It probably my problem on the confusion table

Let say I have data tab with result and lookup value:

Kat Apple
Kat Dog
Kat Tree
Kat Bag
John Car
John Blue

In my second tab, I want to vlookup Kat with result as below:
Vllokup Kat

Results:

Apple
Dog
Tree
Bag

Please help. Thanks!
 
Last edited:
Upvote 0
Thanks Aladin for correcting the formula ...:cool:
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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