TGViewer
Data Analytics Data Analytics @sqlspecialist ยท 111K subscribers
Post #2995 5.37K
๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„๐—ฒ๐—ฟ:
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!
  • โค 11
More from @sqlspecialist
  1. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  2. Oct 7, 2026๐Ÿ“Š Kandinsky 6.0 Video: AI-Powered Content Creation for Analysts The new Kandinsky 6.0 Vidโ€ฆ
  3. Oct 7, 2026Alternatively, depending on the Excel version and requirement, I could use functions suchโ€ฆ
  4. Oct 7, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 5 Guys, let's continue our Data Analyst Interviewโ€ฆ
  5. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  6. Oct 7, 2026๐Ÿ”Ÿ What is the difference between UNION and JOIN? Sample Answer: "JOIN combines columns frโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’