Excel highlight cell rules: Greater Than, Text that Contains, Duplicate Values
Highlight Cells Rules: color large and small values, matching text and duplicates. Traps with strict “greater than”, partial text matches and deleting duplicates.
Highlight Cells Rules is the most used part of conditional formatting. It answers a concrete question: “which cells meet the condition?” — orders over 1,000,000 soum, products with “tea” in the name, phone numbers entered twice.
Setting it up takes 30 seconds, and the result keeps itself up to date: enter a new value or change an old one, and the color appears or disappears on its own.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Phone | Product | Amount | |
| 2 | 901234567 | Black tea | 450 000 | |
| 3 | 935557788 | Rice | 1 250 000 | |
| 4 | 977771122 | Green tea | 380 000 | |
| 5 | 901234567 | Sugar | 1 000 000 | |
| 6 | 998887766 | Teapot | 2 100 000 | |
| 7 | 935557788 | Flour | 760 000 | |
| 8 |
Greater Than: highlight large amounts
1
Select the Amount column (C2:C7) → Главная → Условное форматирование → Highlight Cells Rules → Greater Than....
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Phone | Product | Amount | |
| 2 | 901234567 | Black tea | 450 000 | |
| 3 | 935557788 | Rice | 1 250 000 | |
| 4 | 977771122 | Green tea | 380 000 | |
| 5 | 901234567 | Sugar | 1 000 000 | |
| 6 | 998887766 | Teapot | 2 100 000 | |
| 7 | 935557788 | Flour | 760 000 | |
| 8 |
2
Type the threshold in the left box — 1000000 — and pick a format on the right — Green Fill with Dark Green Text. If no preset fits, use Custom Format... to set any color, font or border.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Phone | Product | Amount | |
| 2 | 901234567 | Black tea | 450 000 | |
| 3 | 935557788 | Rice | 1 250 000 | |
| 4 | 977771122 | Green tea | 380 000 | |
| 5 | 901234567 | Sugar | 1 000 000 | |
| 6 | 998887766 | Teapot | 2 100 000 | |
| 7 | 935557788 | Flour | 760 000 | |
| 8 |
3
Click OK. Two amounts turn green. Notice that C5, exactly 1,000,000, isn’t colored — the warning below explains why.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Phone | Product | Amount | |
| 2 | 901234567 | Black tea | 450 000 | |
| 3 | 935557788 | Rice | 1 250 000 | |
| 4 | 977771122 | Green tea | 380 000 | |
| 5 | 901234567 | Sugar | 1 000 0001 | |
| 6 | 998887766 | Teapot | 2 100 000 | |
| 7 | 935557788 | Flour | 760 000 | |
| 8 |
Link the threshold to a cell
You don’t have to type a number in the dialog’s value box — click a cell and a reference like =$F$1 goes in. Now change the threshold in F1 (say, from 1,000,000 to 2,000,000) and the colors recalculate instantly.
This is especially handy for Between...: put the “from” and “to” values in two cells and you get a small “control panel” above the table.
Text that Contains: highlight by text
1
Select the Product column (B2:B7) → Highlight Cells Rules → Text that Contains.... Type the word to look for — tea — and pick Yellow Fill with Dark Yellow Text.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Phone | Product | Amount | |
| 2 | 901234567 | Black tea | 450 000 | |
| 3 | 935557788 | Rice | 1 250 000 | |
| 4 | 977771122 | Green tea | 380 000 | |
| 5 | 901234567 | Sugar | 1 000 000 | |
| 6 | 998887766 | Teapot | 2 100 000 | |
| 7 | 935557788 | Flour | 760 000 | |
| 8 |
2
Click OK and check the result. The rule ignores case (“Tea” = “tea”) and matches anywhere in the text. So along with “Black tea” and “Green tea”, Teapot got colored too — a pot, not tea. Always check the result by eye or make the search more precise (for example, “ tea” with a leading space).
Duplicate Values: find repeats
1
Select the Phone column (A2:A7) → Highlight Cells Rules → Duplicate Values.... In the left list choose Duplicate or Unique (values that appear only once).
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Phone | Product | Amount | |
| 2 | 901234567 | Black tea | 450 000 | |
| 3 | 935557788 | Rice | 1 250 000 | |
| 4 | 977771122 | Green tea | 380 000 | |
| 5 | 901234567 | Sugar | 1 000 000 | |
| 6 | 998887766 | Teapot | 2 100 000 | |
| 7 | 935557788 | Flour | 760 000 | |
| 8 |
2
Click OK. Both numbers that appear twice — the first one and the repeat — turn red. It is the quickest way to check a customer list, order numbers or employee IDs.
A Date Occurring: highlight by date
A Date Occurring... works relative to today: Yesterday, Today, Tomorrow, In the last 7 days, Last week, This week, Next week, Last month, This month, Next month. The result updates itself every day you open the file — handy for today’s deliveries or this week’s birthdays.
There is no “overdue” option in the list. For that, use a formula rule: =$D2<СЕГОДНЯ().
Pro level: More Rules and formula rules
More Rules... → Format only cells that contain offers conditions missing from the menu:
- Blanks / No Blanks — highlight required fields left empty (incomplete form rows).
- Errors — find cells with #N/A, #DIV/0! and the like.
- Cell Value → greater than or equal to, not between — comparisons Greater Than doesn’t offer.
To color only the repeat itself (not the first copy): select A2:A7 → New Rule → Use a formula → =СЧЁТЕСЛИ($A$2:A2;A2)>1. The start of the range is locked while its end grows downward row by row, so the formula only counts the rows above.
Try it in the simulator
Compare two duplicate checks: type =СЧЁТЕСЛИ($A$2:$A$7;A2)>1 (every copy) in D2 and =СЧЁТЕСЛИ($A$2:A2;A2)>1 (repeats only) in E2, then fill both down to row 7. Column E shows TRUE only for numbers on their second appearance.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Phone | Product | Amount | All copies | Repeat only | |||||||||||||||||||
| 2 | 901234567 | Black tea | 450000 | |||||||||||||||||||||
| 3 | 935557788 | Rice | 1250000 | |||||||||||||||||||||
| 4 | 977771122 | Green tea | 380000 | |||||||||||||||||||||
| 5 | 901234567 | Sugar | 1000000 | |||||||||||||||||||||
| 6 | 998887766 | Teapot | 2100000 | |||||||||||||||||||||
| 7 | 935557788 | Flour | 760000 | |||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 | ||||||||||||||||||||||||
| 11 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.