Function Problems

How to Return the Name with the Highest Value for a Selected Category

Kushani NimanthikaKushani Nimanthika Nov 11, 2026 869 views

Question details

The user needs to extract the name associated with the maximum value in a specific subset or category, without accidentally returning a maximum value from a different category.

How to Return the Name with the Highest Value for a Selected Category
Product
Spreadsheet
Device & OS
not provided
Scenario
Filtering data sets to find the top performer, character, or item within a dynamically selected category without altering the source table.
Observed behavior
Standard VLOOKUP or MAX formulas might identify the highest value overall, requiring combined functions to apply the category filter before retrieving the corresponding name.
Before you start

Ensure your data is formatted as a structured Table or that your reference ranges are locked (absolute references), and clearly identify your columns for Names, Values, and Categories.

Solution 1Recommended

Use INDEX, MATCH, and MAXIFS (For Single Results)

This solution is perfect for most spreadsheet users. It combines MAXIFS to identify the highest value in a specific category with INDEX and MATCH to locate the exact row and retrieve the name.

This formula creates a logical array. It ensures two conditions are met: the value must equal the maximum value of the targeted category, and the category must match the user's selection.

1
Prepare your data table

Format your dataset as a Table named 'CharacterProfs'. Ensure you have columns for 'Character' (Names), 'Vanilla' (Values), and 'Profession' (Categories).

2
Designate a selection cell

Select a cell, for example, F10, where you will type the specific category (e.g., a specific Profession) you want to analyze.

3
Enter the formula

In your result cell, enter the formula: =INDEX(CharacterProfs[Character], MATCH(1, (MAXIFS(CharacterProfs[Vanilla], CharacterProfs[Profession], F10) = CharacterProfs[Vanilla]) * (CharacterProfs[Profession] = F10), 0))

4
Execute the function

Press Enter to calculate. The cell will now display the name of the character with the highest value in the profession specified in cell F10.

Use INDEX, MATCH, and MAXIFS (For Single Results)
Handling Array Formulas: Depending on your software version, you may need to press Ctrl+Shift+Enter to evaluate the array properly if standard Enter results in a #VALUE error.

Analyze Complex Data Effortlessly with WPS Spreadsheet

WPS Spreadsheet provides robust support for advanced data analysis functions including MAXIFS, INDEX, MATCH, and dynamic arrays, making it incredibly easy to retrieve specific category data.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your existing data file.
  2. 2. Apply the lookup formula: Select an empty cell and paste the provided INDEX/MATCH/MAXIFS formula.
  3. 3. Update category dynamically: Change the reference cell text to instantly see the top performer for any new category.
Fully compatible with Microsoft Excel formats (.xlsx) and formulasNative support for advanced lookup arrays and MAXIFS functionsLightweight, fast execution even when analyzing large datasetsFree to use with a familiar, user-friendly interface
microsoft office alternative - wps office

Frequently Asked Questions

Why is my formula returning a #N/A error?

A #N/A error usually indicates that the MATCH function could not find the exact condition. Ensure that the category typed in your reference cell matches the spelling in your category column exactly, and that your highest value exists.

What if my version of the software doesn't have the MAXIFS function?

If MAXIFS is unavailable, you can substitute it with an array formula using MAX and IF. For example: MAX(IF(CategoryRange=SelectedCategory, ValueRange)). You must press Ctrl+Shift+Enter for this to work in older versions.

How does multiplying conditions with an asterisk (*) work in this formula?

In spreadsheet formulas, the asterisk acts as an 'AND' operator for arrays. It multiplies the True (1) or False (0) results of each condition. Only rows where both conditions are True result in a 1, which the MATCH function then locates.