Function Problems

Return Employee IDs Automatically in Excel with VLOOKUP

Nimra MalikNimra Malik Nov 20, 2026 869 views

Question details

Use employee names to look up and populate matching employee IDs from a reference table.

Return Employee IDs Automatically in Excel with VLOOKUP
Product
Microsoft Excel
Device & OS
not provided
Scenario
An employee list needs an ID beside each name using a separate name-and-ID reference table.
Observed behavior
Each employee name should return its matching ID from the reference table.
Before you start

Arrange the reference table with employee names in its first column and IDs in the next column. For the example below, put names in column C and IDs in column D, with the first name to look up in A1.

Solution 1Recommended

Use VLOOKUP to match names with employee IDs

Use an exact-match formula to retrieve each ID from a two-column reference table.

1
Enter the formula

Select B1, beside the employee name in A1, and enter =VLOOKUP(A1,$C$1:$D$10,2,FALSE).

2
Fill the formula down

Select B1 and drag its fill handle down alongside the remaining employee names. The lookup cell changes for each row, while the dollar signs keep the reference range fixed.

3
Expand the reference range

If the reference table extends beyond row 10, edit the formula in B1 to use a larger range, such as $C$1:$D$100, and fill it down again.

Use VLOOKUP to match names with employee IDs
Use exact matches: FALSE requires an exact name match. VLOOKUP returns the first match if the reference table contains duplicate names.
WPS Spreadsheet

Look up employee IDs in WPS Spreadsheet

Use the same VLOOKUP formula in WPS Spreadsheet to fill employee IDs from a name-and-ID reference table.

  1. 1. Open the employee list: Open WPS Spreadsheet and use File > Open to select your workbook.
  2. 2. Check the reference table: Place reference names in column C and their IDs in column D, with the first employee name to look up in A1.
  3. 3. Enter VLOOKUP: Select B1 and enter =VLOOKUP(A1,$C$1:$D$10,2,FALSE). Adjust the range if your reference table extends beyond row 10.
  4. 4. Fill and save: Drag the fill handle from B1 down beside the other names, then use File > Save to save the workbook.
Return employee IDs using exact-match VLOOKUPOpen and save Microsoft Excel XLSX filesFill formulas down an employee listExpand the lookup range as the reference list grows
microsoft office alternative - wps office

Frequently Asked Questions

How do I include more than 10 employees in the lookup?

Edit the reference range in the formula, for example from $C$1:$D$10 to $C$1:$D$100, then fill the revised formula down the ID column.

Why does VLOOKUP return #N/A for an employee name?

With FALSE, the name must match an entry in the first column of the reference range. Check the spelling, extra spaces and whether the reference range includes that employee.

What happens if two employees have the same name?

VLOOKUP returns the ID for the first matching name in the reference range. Use a unique lookup value if employees share names.

Why are there dollar signs in the reference range?

The dollar signs in $C$1:$D$10 keep the reference table fixed when you drag the formula down. The relative reference A1 changes to A2, A3 and so on.