Function Problems

Find the Company With the Highest Spend for Each Employee in Excel

Rana GarciaRana Garcia Nov 18, 2026 869 views

Question details

Find the company associated with the highest spend for each employee using an Excel formula.

Find the Company With the Highest Spend for Each Employee in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet lists companies, employees, and spend values, and the user wants to look up the highest-spend company for a selected employee.
Observed behavior
The formula should return the company from the employee's highest-spend row, using the first matching row if there is a tie.
Before you start

Arrange company names in A2:A26, employee names in B2:B26, and numeric spend values in C2:C26. Enter the employee to look up in F2, and adjust all ranges consistently if your data is elsewhere.

Solution 1Recommended

Use INDEX, MATCH, and MAXIFS in Microsoft 365 or Excel 2021

Use this formula to return the company on the highest-spend row for the employee in F2.

The formula compares individual spend rows. It does not add together multiple rows for the same company.

1
Enter the employee name

Type the employee name you want to look up in cell F2.

2
Enter the formula

Select an empty cell, such as G2, and enter =INDEX($A$2:$A$26,MATCH(1,($B$2:$B$26=F2)*($C$2:$C$26=MAXIFS($C$2:$C$26,$B$2:$B$26,F2)),0)). Press Enter.

3
Look up other employees

Enter additional employee names below F2, then drag the fill handle from G2 down to copy the formula.

Use INDEX, MATCH, and MAXIFS in Microsoft 365 or Excel 2021
Ties and missing names: If multiple rows have the same highest spend for an employee, the formula returns the company from the first matching row. A name that does not appear in column B returns #N/A.
Find the highest-spend company

Find each employee's highest-spend company in WPS Spreadsheet

Open your workbook in WPS Spreadsheet and use an INDEX, MATCH, LARGE, and IF formula to return the company from each employee's highest-spend row.

  1. 1. Open your workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
  2. 2. Check the data columns: Place company names in A2:A26, employee names in B2:B26, and numeric spend values in C2:C26. Enter the employee to search for in F2.
  3. 3. Enter the lookup formula: Select G2 and enter =INDEX($A$2:$A$26,MATCH(1,(LARGE(IF(F2=$B$2:$B$26,$C$2:$C$26),1)=$C$2:$C$26)*($B$2:$B$26=F2),0)). Confirm with Ctrl+Shift+Enter if your WPS version requires array formula entry.
  4. 4. Copy for other employees: Add employee names below F2 and drag the fill handle from G2 down to return a company for each name.
Look up the company associated with an employee's highest individual spend.Open and edit Microsoft Excel XLSX and XLS files.Use familiar spreadsheet formulas and a familiar interface.Use WPS Office for free.
microsoft office alternative - wps office

Frequently Asked Questions

What happens if two companies have the same highest spend?

The INDEX and MATCH formulas return the company from the first matching row in the data range.

Why does the formula return #N/A?

Check that the employee name in F2 appears in B2:B26 and that the company, employee, and spend ranges cover the same rows. Also confirm that spend values in C2:C26 are numbers.

Do I need Ctrl+Shift+Enter for the formula?

In older Excel versions, confirm the LARGE and IF array formula with Ctrl+Shift+Enter. In Microsoft 365 and Excel 2021, the MAXIFS formula can be entered with Enter.

Does the formula total spend across multiple rows for a company?

No. It finds the highest individual spend value for the employee and returns the company on that row. A company-total comparison requires aggregating the spend by employee and company first.