Vlookup across multiple worksheets

daveasu

Board Regular
Joined
Jan 4, 2012
Messages
53
Need to lookup employee info in a workbook with 77 worksheets. The worksheets are named with a numeric account number from 100000 to 670000 with no real pattern to the numbering.

I have a list of employee names starting in A1 that I need to lookup the first name only across all of the worksheets and return the first match only.

The data on the worksheets is from B2:D20 and I need to return the match in column D. The names are arranged as first name then space then middle initial or last name.

I have this formula but need to modify it to lookup the first name only: (Lookup_sheets is the range of worksheet names)
=VLOOKUP(A1,INDIRECT("'"&INDEX(Lookup_sheets,MATCH(1,--(COUNTIF(INDIRECT("'"&Lookup_sheets&"'!$B$2:$D$20"),A1)>0),0))&"'!$B$2:$D$20"),3,FALSE)
 
Last edited:

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).

darkyxtreme

New Member
Joined
Oct 27, 2021
Messages
9
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Replace any occurrence in your formula you use A1 with
Excel Formula:
LEFT(A1,(FIND(" ",A1,1)-1))

This formula will bring you the text before the first space, in this case the first name
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,857
Messages
5,766,788
Members
425,378
Latest member
kapoor2892

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
Top