How to Highlight Max Value in a Row in Google Sheets

Published on

Want to highlight max values like scores, amounts, or dates in a row or across multiple rows in Google Sheets? Since there’s no built-in rule for this, you can use a custom formula to achieve it. This formula works seamlessly with numbers, dates, and times and adjusts row-wise. Let’s dive into two examples to see how it works.

Example 1: Highlight Max Value in a Row

Assume you have the scores of one player in five attempts in the range B2:F2, and you want to highlight the max score. Here is how to do it:

  1. Select the range B2:F2.
  2. Click Format > Conditional Formatting.
  3. Select Custom Formula under Format Rules.
  4. Enter the following formula:=AND(B2<>"", B2=MAX($B2:$F2))
  5. Select the fill color or font color you want to apply to the max value.
  6. Click Done.

This will highlight the max value in the row.

Highlighting the max value in a row in Google Sheets

Formula Breakdown

The formula follows the syntax:

AND(logical_expression1, [logical_expression2, ...])
  • logical_expression1: B2<>"" – Ensures the cell is not empty.
  • logical_expression2: B2=MAX($B2:$F2) – Checks if the value in the cell equals the max value in the range.

If the row is empty, no highlighting will be applied.

Example 2: Highlight the Highest Value in Each Row

If you want to highlight the max value in each row, simply extend the “Apply to range” selection. No changes to the formula are needed.

For example, assume three players participated in a game and attempted five times each. The scores are in the range B2:F4. Here’s what to do:

  1. Select the range B2:F4.
  2. Click Format > Conditional Formatting.
  3. Use the same formula:=AND(B2<>"", B2=MAX($B2:$F2))
  4. Select your desired highlight color.
  5. Click Done.

The formula will automatically adjust for each row because the MAX function calculates the max value in each row, as the column reference is absolute and the row reference is relative.

Highlighting the highest value in each row in Google Sheets

Additional Resources

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Top Discussions

More like this

The Complete Guide to XLOOKUP in Google Sheets (15+ Practical Examples)

The XLOOKUP function largely replaces traditional lookup functions such as LOOKUP, VLOOKUP, and HLOOKUP...

How to Sort and Filter Pivot Tables in Google Sheets (Complete Guide)

Sorting and filtering are two of the most important techniques for analyzing data in...

Pivot Table Formatting, Output & Special Behavior in Google Sheets

Pivot Tables in Google Sheets are powerful—but they can get tricky once you move...

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.