Excel tutorial
/

Data analysis

Intermediate

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.

Книга1 - Excel
—☐✕
fx
ABCD
1PhoneProductAmount
2901234567Black tea450 000
3935557788Rice1 250 000
4977771122Green tea380 000
5901234567Sugar1 000 000
6998887766Teapot2 100 000
7935557788Flour760 000
8
Готово
Two rules: duplicate phone numbers in red (Duplicate Values), amounts over 1,000,000 in green (Greater Than)

Greater Than: highlight large amounts

1

Select the Amount column (C2:C7) → Главная → Условное форматирование → Highlight Cells Rules → Greater Than....

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить
Буфер обмена
Calibri ▾11 ▾
Шрифт
Выравнивание
Общий ▾
Число
Условное форматированиеФорматировать как таблицуСтили ячеек
Стили
ВставитьУдалитьФормат
Ячейки
АвтосуммаСортировка и фильтрНайти и выделить
Редактирование
C2fx450000
ABCD
1PhoneProductAmount
2901234567Black tea450 000
3935557788Rice1 250 000
4977771122Green tea380 000
5901234567Sugar1 000 000
6998887766Teapot2 100 000
7935557788Flour760 000
8
ГотовоСреднее: 990000Количество: 6Сумма: 5940000

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.

Книга1 - Excel
—☐✕
C2fx450000
ABCD
1PhoneProductAmount
2901234567Black tea450 000
3935557788Rice1 250 000
4977771122Green tea380 000
5901234567Sugar1 000 000
6998887766Teapot2 100 000
7935557788Flour760 000
8
ГотовоСреднее: 990000Количество: 6Сумма: 5940000

3

Click OK. Two amounts turn green. Notice that C5, exactly 1,000,000, isn’t colored — the warning below explains why.

Книга1 - Excel
—☐✕
fx
ABCD
1PhoneProductAmount
2901234567Black tea450 000
3935557788Rice1 250 000
4977771122Green tea380 000
5901234567Sugar1 000 0001
6998887766Teapot2 100 000
7935557788Flour760 000
8
Готово
1 — 1,000,000 is not “greater than 1,000,000”, so it isn’t colored

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.

Книга1 - Excel
—☐✕
B2fxBlack tea
ABCD
1PhoneProductAmount
2901234567Black tea450 000
3935557788Rice1 250 000
4977771122Green tea380 000
5901234567Sugar1 000 000
6998887766Teapot2 100 000
7935557788Flour760 000
8
ГотовоКоличество: 6

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).

Книга1 - Excel
—☐✕
A2fx901234567
ABCD
1PhoneProductAmount
2901234567Black tea450 000
3935557788Rice1 250 000
4977771122Green tea380 000
5901234567Sugar1 000 000
6998887766Teapot2 100 000
7935557788Flour760 000
8
ГотовоКоличество: 6

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.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1PhoneProductAmountAll copiesRepeat only
2901234567Black tea450000
3935557788Rice1250000
4977771122Green tea380000
5901234567Sugar1000000
6998887766Teapot2100000
7935557788Flour760000
8
9
10
11
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

47 / 154