What Is a Conditional Format? Excel Rules Explained

How-to basics · Updated November 22, 2026

A conditional format is a spreadsheet rule that changes a cell’s appearance—its fill color, font, borders, or number format—only when the cell meets a condition you define. In Microsoft Excel, you create these rules with Home > Conditional Formatting, and the formatting is applied automatically as your data changes. For example, you can make every cell in a column turn red when its value drops below 50, and that red highlight appears or disappears instantly as you edit the numbers. The term is standard in spreadsheet software; it is not slang or informal, and it has been used since the 1980s when early spreadsheet programs like Lotus 1-2-3 introduced conditional styling. Today, conditional formatting is one of the most used features in Excel for dashboards, data cleaning, and quick visual analysis.

How Conditional Formatting Works in Excel

Conditional formatting works by evaluating a rule against each cell in a selected range. If the rule’s logic returns TRUE, the formatting you specified is applied; if FALSE, it is not. The rules live in the worksheet and re-evaluate whenever the sheet recalculates, so the formatting always reflects the current values.

  • Cell-value rules: Compare the cell to a number, text, or date (e.g., “greater than 100” or “equal to ‘Paid’”).
  • Top/bottom rules: Highlight the highest or lowest values, or the top/bottom percentage.
  • Data bars, color scales, and icon sets: These apply a gradient, bar length, or icon based on the cell’s rank within the range.
  • Formula-based rules: You write a custom formula that returns TRUE or FALSE; this is the most flexible type.

To create a rule, select the range, go to Home > Conditional Formatting, and choose a rule type. Excel then opens the New Formatting Rule dialog, where you set the condition and click Format to pick the fill, font, or border. On a Mac, the path is the same (Home tab > Conditional Formatting), and the dialog works identically.

Why Use Conditional Formatting

Conditional formatting turns raw numbers into a visual story. It helps you spot outliers, trends, and errors without reading every cell. Common uses include:

  • Flagging overdue dates (e.g., dates older than 30 days).
  • Highlighting duplicate entries in a list.
  • Coloring a heat map of sales by region.
  • Showing progress bars for project completion.
  • Identifying cells that contain errors like #N/A or #DIV/0!.

Because the rules are dynamic, a dashboard built with conditional formatting updates itself as new data is entered, which saves hours of manual formatting.

How to Create a Conditional Formatting Rule (Step by Step)

Here is a concrete example. Suppose you have sales numbers in B2:B20 and you want to highlight any value above 500 in green.

  1. Select B2:B20.
  2. Go to Home > Conditional Formatting > Highlight Cells Rules > Greater Than.
  3. In the dialog, type 500 in the box.
  4. Choose “Green Fill with Dark Green Text” from the dropdown (or click Custom Format to pick your own).
  5. Click OK. The cells with values above 500 turn green.

For a formula-based rule, select the range, choose New Rule > Use a formula to determine which cells to format, and enter a formula like =B2>500 (assuming B2 is the active cell). The formula must be relative to the active cell, not the entire range. Click Format to set the fill, then OK.

Common Problems and How to Fix Them

Conditional formatting is powerful, but it often causes confusion. Here are the most frequent issues and their fixes:

  • Rule applies to the wrong cells: Check the “Applies to” box in the Conditional Formatting Rules Manager (Home > Conditional Formatting > Manage Rules). Make sure the range is correct.
  • Rules conflict or overlap: Excel applies rules in order of priority. Use the up/down arrows in the Rules Manager to reorder them, and check “Stop If True” if you want only the first matching rule to apply.
  • Formula doesn’t work: The formula must be relative to the active cell. For example, if your range is A1:A10 and A1 is active, write =A1>10, not =A2>10.
  • Formatting disappears when sorting: Conditional formatting is attached to cells, not values. If you sort the range, the rules move with the cells, so they still apply to the same positions. If you filter, hidden rows still have their formatting, but you can’t see it.
  • Performance slows down: Too many rules or whole-column references (like A:A) can slow large sheets. Limit the range to the used data and avoid volatile formulas like TODAY() in every rule.

Conditional Formatting vs. Manual Formatting

Manual formatting (changing a cell’s fill or font directly) is static—it stays the same until you change it. Conditional formatting is dynamic—it changes automatically based on the cell’s value. The key difference is that conditional formatting is rule-driven, so it can’t be accidentally overwritten by typing a new value. However, manual formatting always takes precedence over conditional formatting. If you manually color a cell red, a conditional rule that says “turn green if >500” will not override that red fill. To let the rule work, clear the manual format by selecting the cell and using Home > Clear > Clear Formats.

Advanced Tips and Alternatives

For more complex scenarios, you can combine conditional formatting with formulas that use functions like AND, OR, or ISBLANK. For example, to highlight cells in A2:A20 that are both greater than 100 and less than 200, use the formula =AND(A2>100,A2<200). You can also use conditional formatting to highlight entire rows based on a value in one column. Select the whole data range (e.g., A2:D20), create a new rule with the formula =$C2>500, and the dollar sign locks the column so the rule checks column C for each row.

If you don't want to use conditional formatting, you could use Excel tables with built-in banded rows, or apply a custom number format to change how numbers display (e.g., show negatives in red) without affecting the cell's fill. For simple color scales, you can also use the Quick Analysis button that appears when you select a range of numbers.

Frequently Asked Questions

Can I copy conditional formatting to another range? Yes. Select the cell with the formatting, press Ctrl+C (or Command+C on Mac), then select the target range, right-click and choose Paste Special > Formats. This copies the rules, but be aware that relative formulas will adjust to the new location.

Why is my conditional formatting not working? Check the rule's range, the formula's relative references, and whether a manual format is overriding it. Also confirm the rule's condition is actually true for at least one cell—test with a simple rule like “greater than 0” to isolate the issue.

Can I use conditional formatting with dates? Yes. Use rules like “Date Occurring” to highlight yesterday, last week, or next month, or write a formula like =A2 to highlight past dates. Remember that TODAY() is volatile and recalculates each time the sheet changes.

Does conditional formatting work in Google Sheets? Yes, but the menu path is different: Format > Conditional formatting. The rule types are similar, but the interface and some options (like custom formulas) differ slightly. In Excel, you use Home > Conditional Formatting.

How many conditional formatting rules can I have? Excel allows a large number, but performance degrades with too many. A practical limit is a few hundred rules per sheet. Use the Rules Manager to consolidate or remove unused rules.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.