Formatting Issues

How to Highlight the Largest Value in Each Excel Column Using Conditional Formatting

John WilsonJohn Wilson Nov 10, 2026 870 views

Question details

The user needs to find and format the largest value in multiple columns, applying a unique highlight color depending on which row the maximum value is located in.

How to Highlight the Largest Value in Each Excel Column Using Conditional Formatting
Product
Excel
Device & OS
not provided
Scenario
Comparing values vertically across rows in a single column to highlight the maximum value, while differentiating the highlight color based on its row position.
Observed behavior
Requires a method to apply row-specific conditional formatting rules so that if the largest value is in row 1, it turns red; if in row 2, it turns blue, etc.
Before you start

Ensure you select the precise range of cells you wish to analyze before setting up the conditional formatting rules, so the relative formulas apply to the correct cells.

Solution 1Recommended

Apply Formula-Based Conditional Formatting for Row-Specific Colors

Create individual conditional formatting rules for each row using the AND function to determine if a cell is the largest in its column.

To apply different colors based on the row, you cannot use the default 'Top 10 Items' preset. Instead, you need to create a custom formula for each row that checks if its value is strictly greater than the values in the other rows.

1
Select the target range

Highlight the entire range of data you want to format. For example, select A1:C4 if your data spans 4 rows and 3 columns.

2
Open Conditional Formatting menu

Navigate to the Home tab on the ribbon, click on Conditional Formatting, and select New Rule.

3
Choose the formula option

In the dialog box, select 'Use a formula to determine which cells to format'.

4
Set the rule for Row 1

Enter the formula =AND(A1>A2,A1>A3,A1>A4). Click the Format button, select your desired color (e.g., red) from the Fill tab, and click OK.

5
Set the rules for subsequent rows

Repeat the New Rule process for row 2 using =AND(A2>A1,A2>A3,A2>A4) and set the format to blue. For row 3, use =AND(A3>A1,A3>A2,A3>A4) and set the format to green. Continue this pattern for all rows in your dataset.

Apply Formula-Based Conditional Formatting for Row-Specific Colors
Handling Tied Values: These formulas identify a unique largest value. If there might be identical maximum values (ties) that should both be formatted, replace the > symbol with >= in your formulas.
Smart Data Formatting

Easily Apply Conditional Formatting with WPS Spreadsheet

WPS Spreadsheet provides a highly intuitive interface for setting up advanced formula-based conditional formatting rules. It allows you to quickly manage multiple custom rules while ensuring full compatibility with your existing Excel files.

  1. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your spreadsheet containing the data to be formatted.
  2. 2. Access Conditional Formatting: Highlight your target columns, then click 'Conditional Formatting' located under the 'Home' tab.
  3. 3. Input custom formulas: Select 'New Rule' > 'Use a formula to determine which cells to format', and input your custom AND functions for each row.
  4. 4. Apply row-specific colors: Click 'Format' to choose your highlight colors from the 'Patterns' tab, and click 'OK' to apply the rules.
Fully compatible with Microsoft Excel conditional formatting rules and custom formulas.Free and lightweight alternative for robust data analysis.User-friendly rule manager to easily view, edit, and duplicate formatting conditions.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use the MAX function instead of the AND function in conditional formatting?

Yes, you can use a formula like =A1=MAX(A$1:A$4) to find the largest value in a column. However, to apply different colors based on the specific row index, combining the MAX function with a row check or using the AND method described is much more effective for separating the formatting conditions.

How do I apply these formatting rules to additional columns later?

You can easily copy formatting rules using the Format Painter. Select a cell with the rules already applied, click the Format Painter icon on the Home tab, and then highlight the new columns to apply the exact same relative conditional formatting.

Why is the wrong cell highlighting when I apply my formula?

This is usually caused by incorrect cell referencing. In the formula =AND(A1>A2,A1>A3,A1>A4), ensure you have not accidentally locked the columns with absolute reference dollar signs (like $A$1), which prevents the rule from successfully adapting across multiple columns.