In Excel, I have five employees each with a unique emploee code.
In column A I have hundreds of rows of these employee names and I want to return each name's corresponding code in column B.
In columns D and E I have the unique list of employee names and their matching codes.
What formula could I use to return the codes in column B?
Sample Data
A | B | C | D | E | |
---|---|---|---|---|---|
1 | Name | Emp code | Available data | ||
2 | User1 | 01Code | Name | Code | |
3 | User2 | 02Code | User1 | 01Code | |
4 | user4 | 04Code | User2 | 02Code | |
5 | user1 | 01Code | user3 | 03Code | |
6 | user5 | 05Code | user4 | 04Code | |
7 | user3 | 03Code | user5 | 05Code | |
8 | user2 | 02Code |
XLOOKUP
(VLOOKUP
on older versions). It depends on how your data is set up. Might beINDEX/MATCH
. Could you edit your question and include a sample of how your data is set out.