Help with lookup

Adrev

New Member
Joined
Dec 19, 2013
Messages
2
Dear all
I need to search several folders for a match on names taken from a namelist, and then display the department name of the folde the name was found in.
Namelist[TABLE="width: 500"]
<tbody>[TR]
[TD]Name
[/TD]
[TD]Department
[/TD]
[/TR]
[TR]
[TD]Tina
[/TD]
[/TR]
[TR]
[TD]Kim
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lars
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bo
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Sheet 1 (value listed in A1 is department)
[TABLE="width: 500"]
<tbody>[TR]
[TD]JUR
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Name
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Tina
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Lars
[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2 (value listed in A1 is department)[TABLE="width: 500"]
<tbody>[TR]
[TD]FIN
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Name
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Kim
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Bo
[/TD]
[/TR]
</tbody>[/TABLE]

I have tried Vlookup and search, but can't get them to work.

Please help me
Thank you for takeing the time
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Formula in B2 copied down (note the named range):

Excel 2010
ABCD
NameDepartmentSheet1
TinaJURSheet2
KimFIN
LarsJUR
BoFIN

<COLGROUP><COL style="BACKGROUND-COLOR: #dae7f5"><COL><COL><COL><COL></COLGROUP><THEAD>
</THEAD><TBODY>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

</TBODY>
Namelist

[TABLE="width: 85%"]
<TBODY>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<THEAD>[TR="bgcolor: #dae7f5"]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</THEAD><TBODY>[TR]
[TH="width: 10, bgcolor: #dae7f5"]B2[/TH]
[TD="align: left"]{=INDIRECT("'"&INDEX(Sheets,MATCH(1,COUNTIF(INDIRECT("'"&Sheets&"'!B:B"),A2),FALSE))&"'!A1")}[/TD]
[/TR]
</TBODY>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</TBODY>[/TABLE]

[TABLE="width: 85%"]
<TBODY>[TR]
[TD]Workbook Defined Names[TABLE="width: 100%"]
<THEAD>[TR="bgcolor: #dae7f5"]
[TH="width: 10"]Name[/TH]
[TH="align: left"]Refers To[/TH]
[/TR]
</THEAD><TBODY>[TR]
[TH="width: 10, bgcolor: #dae7f5"]Sheets[/TH]
[TD="align: left"]=Namelist!$D$1:$D$2[/TD]
[/TR]
</TBODY>[/TABLE]
[/TD]
[/TR]
</TBODY>[/TABLE]
 
Upvote 0
Thanks for the fast respond.
I tryed to follow your formula, because i work on a danish excel i had to change the , to ; but other then that it stayed the same.
It didn't work on my document, so i tryed to create a test document to see if i could make it work there. But i still get a #NAME? any idea why that might be?

Thanks for the help :)
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,114
Members
452,302
Latest member
TaMere

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