Mark the winner and the loser automatically. Two formula rules using MAX and MIN highlight the largest and smallest values in a range — and they move as the data changes.
The example
Scores with the top and bottom flagged.
| A | B | |
|---|---|---|
| 1 | Name | Score |
| 2 | Ann | 95 (max) |
| 3 | Bo | 72 |
| 4 | Cy | 58 (min) |
| 5 | Di | 81 |
The formula
Two rules — one for the high, one for the low:
How it works
Compare each cell to the range’s extreme:
- Select B2:B20, then add a formula rule
=B2 = MAX($B$2:$B$20)with a green fill for the highest value. - Add a second rule
=B2 = MIN($B$2:$B$20)with a red fill for the lowest. - The range is locked (
$) so every cell compares to the same MAX/MIN; the test cell is relative so it walks the column. - Edit any number and the highlights jump to the new extremes automatically.
Top 3 instead of just the max? Use LARGE: =B2 >= LARGE($B$2:$B$20, 3) highlights the three highest. For the bottom 3, swap in SMALL(…, 3) with <=.
Try it: interactive demo
Edit the scores; max and min highlight.
Variations
Top 3 values
Use LARGE:
Bottom 3 values
Use SMALL:
Max per row
Highlight each row’s best (lock columns):
Pitfalls & errors
Ties highlight together. If two cells share the max, both light up — usually fine, but be aware if you expect exactly one.
Lock the range. $B$2:$B$20 must be absolute, or each row compares to a shifting window and the wrong cells highlight.
Blanks and text. MAX/MIN ignore text and blanks, but a stray 0 counts as the minimum — clean the data if 0 means “no value.”
Practice workbook
Frequently asked questions
How do I highlight the highest and lowest values in Excel?
How do I highlight the top 3 values?
Why do two cells highlight as the maximum?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class