In Excel: select the range, choose Home ▸ Conditional Formatting ▸ New Rule ▸ Use a formula to determine which cells to format, and enter a rule like =$B2>100 written for the top-left cell of the selection.
Select the exact range to format, starting at the top-left cell.
Choose Home ▸ Conditional Formatting ▸ New Rule ▸ Use a formula to determine which cells to format.
Write the formula for the top-left cell: =$B2>100 colors whole rows where column B exceeds 100.
For a contains-text rule, use =ISNUMBER(SEARCH("urgent",$A2)).
Click Format, set the fill, and confirm with OK.
Open Manage Rules to check the Applies to range and rule order; tick Stop If True when a higher rule should win.
What this does
Conditional formatting applies a fill, font or border automatically while a condition is true and removes it when it stops being true. The built-in presets cover simple cases; a formula rule handles everything else, including formatting a cell based on another cell. Excel evaluates the formula once per cell in the Applies to range, shifting relative references as it moves — so the $ anchors decide what each cell actually tests. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “what is the conditional formatting in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a workspace setting that makes a big sheet comfortable to navigate, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Orders sit in A2:D10 with amounts in column B: B2 is 150, B3 is 80, B4 is 230. Select A2:D10, add the formula rule =$B2>100 and pick a green fill. Rows 2 and 4 turn green across all four columns; row 3 stays plain. $B locks the column while the row number stays relative, so every cell in a row tests its own row’s B value — B$2 would instead compare everything against row 2. A formula rule keeps status visible without manual recoloring: overdue rows, high amounts or matching text get marked the moment the data changes. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. If you take one thing from this page on “what is the conditional formatting in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.
Common mistakes
- Writing
$B$2instead of$B2, so every row tests the same single cell. - Using
B$2for a row-wise rule — that locks the row, not the column. - Writing the formula for the wrong cell: it must evaluate for the top-left cell of the Applies to range.
- Letting an earlier rule mask a later one instead of reordering in Manage Rules or using Stop If True.
- Comparing text values with > and expecting numeric behavior.
Frequently asked questions
How do I format a cell based on another cell?
Use a formula rule that references the other cell: select C2:C20 and use =$B2="Done". The formatted range and the tested cell do not have to be the same.
How do I highlight cells that contain specific text?
Use =ISNUMBER(SEARCH("urgent",$A2)) as the rule formula. SEARCH ignores case; use FIND for a case-sensitive match.
What is the Google Sheets equivalent?
Format ▸ Conditional formatting ▸ Custom formula is. The formula works the same way, anchors included, and must start with =.
Other ways people ask this
On the way here you may have searched this as “what is conditional formatting excel” and “what is conditional formatting in excel with example” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “what is conditional formatting excel”, “what is conditional formatting in excel with example” all point at the one operation explained on this page, which is why they all lead here.