Find an employee name by employee ID
Look up the employee ID using an exact match and return the name from the same row.
Copyable formulas
English Excel · en-US
=XLOOKUP(E2,A2:A4,B2:B4,"ID not found")Turkish Excel · tr-TR
=ÇAPRAZARA(E2;A2:A4;B2:B4;"Kod bulunamadı")Sample data
Enter the headers and sample records in A1:B4.
| Employee ID | Name |
|---|---|
| P-101 | Deniz |
| P-102 | Ada |
| P-103 | Ege |
- E2 = P-102
Enter the formula in E3.
To try the Turkish formula, use the sample data on the Turkish page.
Expected result
Ada
How it works
Keep employee IDs unique. P-999 returns ID not found. For IDs with leading zeros, enter both the source IDs and lookup input as text. In older Excel versions, use the exact-match VLOOKUP approach linked below.
Compatibility
Excel for Microsoft 365, Excel 2021, and Excel 2024.