How to Highlight Max Value in a Row in Google Sheets

Published on

To highlight a cell or cells conditionally in spreadsheets, there is a built-in option called conditional formatting. We can use that conditional formatting option to highlight the max value in a row in Google Sheets. See the example below.

In the below example let’s see how to highlight a max value cell in a row, or in each row. This method will be useful in visually finding max scores, max sales extra from a horizontal data range.

As a side note, to find the max/large value in Google Doc Sheets, we can use the function Max or Large. To return a max value conditionally, I mean If + Max, then use Maxifs.

Example to Max Value Highlighted Row-wise in Sheets:

Highlight Max Value in a Row in Google Sheets

In my above Sheets, the max value in row # 3 (B3:M3) is 12. For this example, I have randomized the numbers 1 to 12 in each row.

As a result, the max value highlighted in each row is the cells that containing the number 12.

Custom Google Sheets Formula to Highlight Max Value in a Row

The formula to use within conditional formatting may be slightly different from the formula that you use in a spreadsheet cell.

Formula Rule 1:

=B3:M3=max($B3:$M3)
or
=B3=max($B3:$M3)

You can use this custom formula in conditional formatting as below.

color max value in a row

In the above example, the range to highlight is limited to B3:M12. What about the infinite range B3:M?

My custom formula will work in an infinite range too. But you may face one issue. The formula will also highlight all the blank rows with the blue color that, of course, you may not want to see happen.

How to Skip Blank Rows in Max Value Conditional Formatting?

To exclude blank rows in conditional formatting there is a quick trick. No need to change the above formatting rule! Just apply an additional rule as below and choose the fill color as “White”.

Formula Rule 2:

=B3:M3=MIN($B3:$M3)

This MIN formula does the trick. But make sure that you have moved this rule to the top of the formatting rule as below.

drag to move a formatting rule

If you don’t want to use and extra rule to skip the blank rows in the max formatting, then use the below formula instead of the Formula Rule 1. Do not use Formula Rule 2.

Formula Rule 3:

=and(B3=max($B3:$M3),len(B3))

Note: If there are more than one max value in any row, all the max values in that rows will be highlighted.

Hope you have learned how to highlight max value in a row in Google Sheets. Enjoy!

Additional Resources:

  1. Date Related Conditional Formatting Rules in Google Sheets.
  2. Role of Indirect Function in Conditional Formatting in Google Sheets.
  3. Highlight an Entire Row in Conditional Formatting in Google Sheets.
  4. How to Highlight Vlookup Result Value in Google Sheets.
  5. Highlight Intersecting Value in Google Sheets in a Two Way Lookup.
Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Lookup Values Under Categories in Excel and Google Sheets

We can use a combination of XLOOKUP and VLOOKUP in both Excel and Google...

Extract Items Under a Category from the Same Column in Excel

In Excel, you can use a combination of the XLOOKUP and DROP functions to...

How to Create a Searchable Table in Excel Using the FILTER Function

Finding specific records, or rows containing the required information, is straightforward in Excel using...

Time Sequences in Excel by Minute, Hour, or Second Increments

Creating time sequences, whether by hour, minute, or second increments in Excel, can be...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.