lookup for multiple returns

y3tter

Board Regular
Joined
Nov 11, 2012
Messages
147
I have a workbook that has employee info in sheet1. Sheet2 lists the employees dependents with corresponding employees social security number in column A. Some employees have multiple dependents listed in multiple rows. Is there a formula that I can use in sheet1 to list each dependent in column, F, G, H, etc.?


Sheet1
111-11-1111SmithJon
222-22-2222WilsonDave
333-33-3333CharJan
444-44-4444PageChris

<tbody>
</tbody>


Sheet2

111-11-1111SmithKim
111-11-1111SmithSyd
111-11-1111SmithSandy
222-22-2222WilsonJan
333-33-3333CharSarah
333-33-3333CharDave
444-44-4444PageMike
444-44-4444PageLarry

<tbody>
</tbody>
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
How about


Excel 2013/2016
ABCDEFGH
1
2111-11-1111SmithJonKimSydSandy
3222-22-2222WilsonDaveJan
4333-33-3333CharJanSarahDave
5444-44-4444PageChrisMikeLarry
Sheet1
Cell Formulas
RangeFormula
F2=IFERROR(INDEX(sheet2!$C$2:$C$9,AGGREGATE(15,6,ROW(sheet2!$C$2:$C$9)-ROW(sheet2!$C$2)+1/(sheet2!$A$2:$A$9=$A2),COLUMNS($A:A))),"")
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,407
Messages
6,119,332
Members
448,888
Latest member
Arle8907

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