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.

Calculate Trip Days by Month (Start, End, and Full Days) in Google Sheets

If you're managing business travel in Google Sheets, you may need to calculate how...

Mode of Comma-Separated Numbers in Excel (Dynamic Array)

There is no dedicated function in Excel to directly find the mode of comma-separated...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

More like this

Calculate Trip Days by Month (Start, End, and Full Days) in Google Sheets

If you're managing business travel in Google Sheets, you may need to calculate how...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

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.