Pull multiple columns for an employee (VLOOKUP)
The problem
Problem statement
You are building an employee profile card. Given an employee ID in F2, pull their Department into G2 and City into H2 from the master employee directory in columns A–D. Lock the table reference with $ so the lookup formula remains stable across columns.
Lock the table with $ and change only the column index — the same formula has to serve the city column too.
Problem data
Show the sheet as a table (selectable, copyable)
| A | B | C | D | F | G | H | |
|---|---|---|---|---|---|---|---|
| 1 | Emp ID | Name | Department | City | Emp ID | Department | City |
| 2 | E-101 | Alice Chen | Finance | New York | E-103 | ||
| 3 | E-102 | Bob Taylor | Engineering | Seattle | |||
| 4 | E-103 | Carla Mendez | Marketing | Chicago | |||
| 5 | E-104 | David Kim | Sales | Austin | |||
| 6 | E-105 | Eva Rossi | Operations | Denver |
Notes
When fetching multiple fields for the same ID, keep the table range locked ($A$2:$D$6) and the lookup value column-locked ($F$2 or $F2). Then increment col_index_num: column 3 for Department, column 4 for City.
How to approach
Your answer goes in G2:H2. On submit we re-run your formula against 3 different sets of input, so a hardcoded number will fail — the formula has to follow the cells.
- Target cells are G2:H2 — write the formula in G2 for Department first
- In G2, lookup_value is $F$2, table_array is $A$2:$D$6
- Department is the 3rd column in the master table (col_index_num = 3)
- City is the 4th column in the master table (col_index_num = 4)
- Use FALSE (or 0) for range_lookup to ensure exact ID matching
Official solutions
Show 2 solutions — try it yourself first
Approach 1: Standard VLOOKUP with absolute references
=VLOOKUP($F$2, $A$2:$D$6, 3, FALSE)
Looks up the Emp ID in $F$2 within the locked table $A$2:$D$6. Index 3 extracts Department in G2 (and index 4 extracts City in H2).
Approach 2: Relative row with locked lookup column
=VLOOKUP($F2, $A$2:$D$6, 3, FALSE)
Locking column F ($F2) allows you to copy or drag the formula horizontally to column H while keeping the lookup pointer fixed on Emp ID.
Function guide
FAQ
How do I use VLOOKUP to return multiple columns?
Keep the lookup value ($F2) and table array ($A$2:$D$6) locked with $. In each output column, set col_index_num to the appropriate column number (3 for Department, 4 for City).
Can VLOOKUP return multiple columns automatically?
In modern Excel (Microsoft 365) and Google Sheets, you can pass an array constant like {3, 4}: =VLOOKUP(F2, A2:D6, {3, 4}, FALSE), which spills both columns at once.
What if an Employee ID is not found?
VLOOKUP returns #N/A. To handle missing entries cleanly, wrap the VLOOKUP in IFERROR or IFNA: =IFERROR(VLOOKUP($F$2, $A$2:$D$6, 3, FALSE), "Not Found").