INDEX / HR Manager

Dynamically Finding Employee Salary by ID

An HR Manager frequently needs to look up an employee's salary based on their unique Employee ID. Manually searching through a large employee roster is inefficient and prone to errors, especially when dealing with hundreds or thousands of employees.

formula.xlsx
=INDEX(D2:D5, MATCH(1003, A2:A5, 0))

How it works: This formula uses MATCH to dynamically find the row number of 'Employee ID 1003' within the A2:A5 range. MATCH(1003, A2:A5, 0) returns 3 because '1003' is the third item in that list. This 3 is then passed as the row_num argument to INDEX. INDEX(D2:D5, 3) then retrieves the value from the third position in the D2:D5 (Salary) range, which is 65000.

Data Setup

Employee ID Employee Name Department Salary
1001 Alice Smith Sales 60000
1002 Bob Johnson Marketing 75000
1003 Charlie Brown HR 65000
1004 Diana Prince IT 90000

Step-by-Step Guide

1

Identify the range containing the data you want to retrieve (e.g., the Salary column D2:D5). This will be the array argument for INDEX.

2

Determine the lookup value (e.g., 1003 for Employee ID).

3

Identify the range where your lookup value can be found (e.g., the Employee ID column A2:A5). This will be the lookup_array for MATCH.

4

Combine INDEX with MATCH: =INDEX(D2:D5, MATCH(1003, A2:A5, 0))

5

Place the formula in a cell where you want the salary to appear.

Explore More