HomeGoogle DocsSpreadsheetHow to Highlight Max Value in a Row in Google Sheets

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.

Creating Sequential Dates in Equally Merged Cells in Google Sheets

Do you know how to create sequential dates in equally merged cells across a...

Running Total By Month in Excel

This tutorial demonstrates how to calculate the running total by month in a range...

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

More like this

Creating Sequential Dates in Equally Merged Cells in Google Sheets

Do you know how to create sequential dates in equally merged cells across a...

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

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.