You have 2 minutes to solve this Excel problem.
You have the following data:
Employee | Department | Salary
John | IT | 75,000
Sarah | HR | 60,000
Mike | IT | 82,000
David | Finance | 90,000
Alice | HR | 65,000
How would you find the employee with the highest salary in the IT department?
๐ ๐ฒ: Challenge accepted! ๐ช
=XLOOKUP(
MAXIFS(C2:C6,B2:B6,"IT"),
C2:C6,
A2:A6
)
๐ก Explanation:
This formula combines MAXIFS() and XLOOKUP() to find the employee with the highest salary within a specific department.
MAXIFS() finds the highest salary where the department is IT.
XLOOKUP() searches for that salary in the Salary column.
It returns the corresponding employee name.
This challenge tests your understanding of:
โ MAXIFS()
โ XLOOKUP()
โ Multiple Criteria
โ Combining Excel Functions
๐ฏ Expected Output Example
Department | Highest Salary | Employee
IT | 82,000 | Mike
๐ Bonus (Dynamic Department)
If cell E2 contains the department name:
=XLOOKUP(
MAXIFS(C2:C6,B2:B6,E2),
C2:C6,
A2:A6
)
Now you can change E2 to HR, Finance, or another department and get the corresponding highest-paid employee.
โ ๏ธ Interview Tip:
If two employees have the same highest salary, XLOOKUP() returns the first matching employee. Be ready to explain how you would modify the formula if the interviewer wants all employees tied for the highest salary.
โค๏ธ React with โค๏ธ for more Excel interview challenges!