Find the Company With the Highest Spend for Each Employee in Excel
Question details
Find the company associated with the highest spend for each employee using an Excel formula.

- 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.
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.
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.
Type the employee name you want to look up in cell F2.
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.
Enter additional employee names below F2, then drag the fill handle from G2 down to copy the formula.

Use an array formula in older Excel versions
Use LARGE and IF when your version of Excel does not have MAXIFS.
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. Open your workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
- 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. 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. Copy for other employees: Add employee names below F2 and drag the fill handle from G2 down to return a company for each name.

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.




