🎉 Black Friday Sale: 40% OFF everything with code BF40 · ends 1 Dec  Shop now →

Conditional Formatting in Excel: 20 Business Rules That Catch Problems Early

Conditional formatting in Excel colours cells automatically when a rule is true, so overdue invoices, low stock and duplicate entries stand out without scanning. Select the range, choose Home, Conditional Formatting, New Rule, use a formula and pick a format. This guide gives 20 business rules, and the Dynamic Conditional Formatting in Excel template costs $4.99.

Last updated: November 2026

Key takeaways

  • Conditional formatting in Excel works best on rules that answer a yes or no question, such as "is this invoice past its due date?"
  • Every formula rule below uses the "Use a formula to determine which cells to format" option and is written for the first data row (row 2).
  • Lock the column with a dollar sign (for example $C2) to colour a whole row, and lock both parts ($C$2) only for fixed reference cells.
  • Duplicates, top 3 and greater-than rules have built-in options, so you only need a formula when the rule depends on another cell.
  • The Dynamic Conditional Formatting in Excel template costs $4.99 and the Inventory and Reorder Point Tracker costs $6.99, if you would rather start from a built workbook.
Excel + AI Mastery: 100 Essential Formulas courseLaunch offer
🎓 NEXTGENTEMPLATES ACADEMY
Want to build templates like these yourself?
Excel + AI Mastery: 100 Essential Formulas

SUMIFS, XLOOKUP, FILTER, LAMBDA and checking AI-written formulas, with real business projects. 11h 47m of video by PK, with practice files, quizzes and a capstone.

Conditional formatting in Excel: templates compared

The rules in this guide work on any sheet. If you want a workbook already laid out for the data they apply to, these are the closest matches in the catalog.

TemplateFormatBest ForPrice
Dynamic Conditional Formatting in Excel (Best overall)ExcelColour scales, data bars, icon sets and custom highlight rules$4.99
Inventory and Reorder Point Tracker (Best value)Excel and Google SheetsStock status and reorder decisions$6.99
Budget vs Actual Dashboard in ExcelExcelSpotting overspend by department and account$17.99
Accounts Receivable Aging Dashboard in ExcelExcelOverdue invoices and aging buckets$17.99
Attendance Tracker in ExcelExcelAbsences, late arrivals and hours$6.99
Pro Gantt Chart in Excel with data entry formExcel (macro-enabled)Project dates, status and dependencies$9.99

conditional formatting in excel

How we picked these rules and templates

We started from the questions managers ask a spreadsheet every week: who is late, what is over budget, what needs reordering, what is wrong with the data. Each rule had to work with a plain formula or a built-in option in desktop Excel, with no macros. We left out rules that depend on one specific layout and kept the ones you can adapt by changing a column letter. Templates are listed only where the product matches the data the rule applies to.

How do you set up conditional formatting in Excel?

Every rule below uses the same routine. Learn it once and the 20 rules become 20 formulas to paste. The official reference is on Microsoft Support for Excel.

  1. Select the full data range, for example A2:F500, starting from the first data row and not the header.
  2. Go to Home, Conditional Formatting, New Rule.
  3. Choose "Use a formula to determine which cells to format".
  4. Type the formula in the box. Write it as if you were in the top-left cell of your selection.
  5. Click Format, pick a fill or font colour, then OK twice.
  6. Open Home, Conditional Formatting, Manage Rules to check the "Applies to" range and the order of rules.

How does an Excel conditional formatting formula work?

An Excel conditional formatting formula returns TRUE or FALSE for each cell. When it returns TRUE, the format is applied. Excel evaluates the formula for the top-left cell of the range and shifts the references for every other cell, which is why the dollar signs matter.

  • $C2 locks the column and lets the row move. Use it to colour a whole row based on column C.
  • C2 lets both move. Use it to format each cell on its own value.
  • $C$2 locks both. Use it to compare every row with one fixed cell, such as a target.

How do you do conditional formatting based on another cell?

Conditional formatting based on another cell needs a formula rule, because the built-in options only look at the cell being formatted. Select the range you want coloured, then write a formula that points at the other column. If you want A2:F500 to turn red when column F says "Escalated", the formula is =$F2="Escalated". Several rules below use this pattern.

Money: which conditional formatting rules catch financial problems?

Rule 1. Flag actual spend above budget

Budget sits in column B and actual spend in column C. This turns a row red as soon as spend passes budget, which is the cheapest early warning in any cost report.

=$C2>$B2

  1. Select A2:E200.
  2. New Rule, Use a formula, paste the formula.
  3. Choose a light red fill with dark red text.

Rule 2. Highlight unpaid invoices past their due date

Due date is in column E and the payment date in column F. An invoice is overdue when the due date is before today and the payment date is empty.

=AND($E2<TODAY(),$F2="")

  1. Select the whole invoice table, A2:H1000.
  2. Paste the formula as a new formula rule.
  3. Pick orange so it differs from the red used for budget overruns.

Rule 3. Highlight amounts above a limit

This is a built-in rule, so no formula is needed. Select the amount column, go to Home, Conditional Formatting, Highlight Cells Rules, Greater Than, and type 10000. If the limit lives in a cell, such as H1, type =$H$1 instead, and the colour moves when you change the limit.

  1. Select C2:C500.
  2. Home, Conditional Formatting, Highlight Cells Rules, Greater Than.
  3. Enter 10000 or =$H$1 and choose a format.

Rule 4. Mark margins below target

Revenue is in column C and cost in column D. The AND check stops a divide by zero error from colouring blank rows. With a 20% floor the formula is:

=AND($C2>0,($C2-$D2)/$C2<0.2)

  1. Select A2:E300.
  2. Paste the formula as a new formula rule.
  3. Change 0.2 to your own margin floor.

Shortcut: to see budget overruns by department without building rules yourself, the Budget vs Actual Dashboard in Excel ($17.99) lists budget lines with a variance status, where negative variance means overspend. For overdue invoices, the Accounts Receivable Aging Dashboard in Excel ($17.99) groups them into 0-30, 31-60, 61-90 and 90+ day buckets.

Budget vs Actual Dashboard in Excel for tracking overspend

Stock: which rules show inventory problems before a stockout?

Rule 5. Flag items at or below the reorder point

On hand is in column B and the reorder point in column C. Colour the whole row so the SKU name is visible too.

=$B2<=$C2

  1. Select A2:H500.
  2. Paste the formula as a formula rule.
  3. Use amber, which signals "order now" and not "broken".

Rule 6. Mark items with zero stock

A stockout deserves a stronger colour than a low-stock warning. Put this rule above Rule 5 in Manage Rules so it wins.

=AND($B2=0,$A2<>"")

  1. Select A2:H500.
  2. Create the rule with a solid red fill.
  3. In Manage Rules, move it above the amber rule.

Rule 7. Highlight overstock by days of supply

Days of supply is in column E. Cash tied up in slow items is as real as a stockout. This flags anything with more than 90 days of cover.

=$E2>90

  1. Select E2:E500 or the whole row.
  2. Paste the formula.
  3. Choose blue, so it reads as "too much" and not "urgent".

Rule 8. Catch negative stock

Negative on-hand numbers usually mean a sale was logged before the delivery or a count was typed wrongly. This built-in rule is enough.

  1. Select the On Hand column.
  2. Home, Conditional Formatting, Highlight Cells Rules, Less Than.
  3. Enter 0 and choose a bold red font.

Shortcut: the Inventory and Reorder Point Tracker in Excel and Google Sheets ($6.99) keeps one inventory list and one stock movements log, and works out on hand, reorder point, days of supply and a status of Reorder now, Low or OK. It comes in Excel and Google Sheets editions in one download.

Inventory and Reorder Point Tracker in Excel and Google Sheets

Dates: how do you highlight due dates and expiries?

Rule 9. Highlight deadlines in the next 7 days

The date is in column B. This shows anything due between today and a week from now, and ignores dates already past.

=AND($B2>=TODAY(),$B2<=TODAY()+7)

  1. Select A2:F300.
  2. Paste the formula as a formula rule.
  3. Use yellow, and change 7 to 14 or 30 if you need longer notice.

Rule 10. Highlight overdue tasks that are not done

Due date is in column B and status in column C. Without the status check, finished work would stay red forever.

=AND($B2<TODAY(),$C2<>"Done")

  1. Select A2:F300.
  2. Paste the formula.
  3. Pick red, and make sure the word in the formula matches your status list exactly.

Rule 11. Shade weekends

With real dates in column A, WEEKDAY with the second argument set to 2 returns 6 for Saturday and 7 for Sunday. Grey weekends make rota and timesheet layouts easier to read.

=WEEKDAY($A2,2)>5

  1. Select A2:H400.
  2. Paste the formula.
  3. Choose a light grey fill.

Rule 12. Flag records not updated in 90 days

The last update date is in column D. Stale records hide risk, such as contracts nobody has reviewed.

=AND($D2<>"",TODAY()-$D2>90)

  1. Select A2:F500.
  2. Paste the formula as a new rule.
  3. Choose a pale purple fill and adjust 90 to your review cycle.

Shortcut: for project plans, the Pro Gantt Chart in Excel with data entry form ($9.99) is a macro-enabled planner with automatic status indicators such as Pending, In Progress and Completed. It needs macros enabled, unlike the rules above.

People: how can conditional formatting track attendance and performance?

Rule 13. Mark late arrivals

Clock-in time is in column C as a real Excel time. This flags anyone after 9:00 AM. The blank check avoids colouring empty rows.

=AND($C2<>"",$C2>TIME(9,0,0))

  1. Select A2:G300.
  2. Paste the formula.
  3. Use orange for lateness and keep red for absence.

Rule 14. Flag people with 3 or more absences

Names are in column A and the attendance code in column D. COUNTIFS counts how many rows for that person say Absent.

=COUNTIFS($A$2:$A$500,$A2,$D$2:$D$500,"Absent")>=3

  1. Select A2:D500.
  2. Paste the formula.
  3. Change 3 to your policy limit.

Rule 15. Highlight the top 3 performers

Use the built-in route: Home, Conditional Formatting, Top/Bottom Rules, Top 10 Items, then change 10 to 3. The formula version gives the same result and is handy when you want the whole row coloured.

=$C2>=LARGE($C$2:$C$100,3)

  1. Select A2:E100.
  2. Paste the formula.
  3. Choose green. Ties will highlight more than 3 rows.

Rule 16. Flag people below 80% of target

Target is in column B and actual in column C. The check on B protects against dividing by zero.

=AND($B2>0,$C2/$B2<0.8)

  1. Select A2:E100.
  2. Paste the formula.
  3. Change 0.8 to the threshold your team uses.

Shortcut: the Attendance Tracker in Excel ($6.99) records daily attendance with customizable categories for full attendance, absences and late arrivals, and calculates total hours. You can layer rules like 13 and 14 on top of its data. For sales targets, see the Sales Target Dashboard in Excel ($17.99).

Attendance Tracker in Excel for absences and late arrivals

Data quality: how do you highlight duplicates in Excel and other errors?

Rule 17. Excel highlight duplicates

The quickest way to highlight duplicates in Excel is the built-in rule: select the column, then Home, Conditional Formatting, Highlight Cells Rules, Duplicate Values. Use a formula when duplicates should only count within one column of a larger table, or when you want the whole row coloured.

=COUNTIF($A$2:$A$500,$A2)>1

  1. Select A2:F500.
  2. Paste the formula as a formula rule.
  3. Choose yellow. Both copies are coloured, so you can decide which to delete.

Rule 18. Flag missing required fields

If column A holds an invoice number and column C must hold an amount, this colours rows where someone started a record and left the amount blank.

=AND($A2<>"",$C2="")

  1. Select A2:F500.
  2. Paste the formula.
  3. Pick a pale red fill.

Rule 19. Catch numbers stored as text

Pasted data often arrives as text that looks like a number, so SUM ignores it. This formula finds those cells in column B.

=AND(ISTEXT($B2),ISNUMBER(VALUE($B2)))

  1. Select B2:B500.
  2. Paste the formula.
  3. Fix flagged cells with Data, Text to Columns, then Finish.

Rule 20. Flag entries missing from an approved list

This is conditional formatting based on another sheet. Approved names live on a sheet called Lists in A2:A50, and column B of your data should only contain those names. Type or paste the range reference into the rule so it points at the other sheet.

=AND($B2<>"",COUNTIF(Lists!$A$2:$A$50,$B2)=0)

  1. Select B2:B500.
  2. Paste the formula.
  3. Choose red. Typos such as "Acme Ltd." against "Acme Ltd" will show up at once.

Worked example: an invoice list with three rules

Take an invoice table with 400 rows: invoice number in A, customer in B, amount in C, due date in D, paid date in E. Select A2:E401 and add these three formula rules.

  1. =AND($D2<TODAY()-60,$E2="") in dark red, for unpaid invoices more than 60 days late.
  2. =AND($D2<TODAY(),$E2="") in orange, for unpaid invoices that are late by any amount.
  3. =COUNTIF($A$2:$A$401,$A2)>1 in yellow, for duplicate invoice numbers.

Excel puts each newly added rule at the top of the list, so open Manage Rules, arrange them in the order shown above and tick "Stop If True" on rule 1. That way an invoice 90 days late shows dark red and not orange. Add a new unpaid invoice due yesterday and it turns orange without any action from you. Add a duplicate number and the yellow rule shows both rows. This stack takes about two minutes to build and replaces a weekly manual scan.

Once the colours work, summarise them. A pivot table dashboard can total the overdue amounts, and the SUMIFS, COUNTIFS and AVERAGEIFS tutorial shows how to count flagged rows with a formula, because colour alone cannot be summed. If your data range grows, use dynamic named ranges so new rows are covered by the rule.

What are the most common conditional formatting errors?

SymptomLikely causeFix
Every row is coloured, or none, based on row 2 onlyFormula uses $A$2 (both locked)Remove the row dollar sign: $A2
Colours are shifted one rowFormula written for row 1 but range starts at row 2Write the formula for the first selected row
Whole column colours wronglyColumn letter not lockedUse $C2, not C2, for row rules
Rule never firesDates or numbers stored as textConvert with Text to Columns, or use Rule 19
Wrong colour winsRule order in Manage RulesMove the stronger rule up, tick Stop If True
Formatting breaks after pastePasted cells overwrote the rule rangeUse Paste Special, Values, then check Applies to
Rule refers to another sheet and errorsOld Excel versions limited cross-sheet referencesUse a named range, or put the list on the same sheet
Blank rows are colouredFormula true for empty cellsAdd a blank check: AND($A2<>"", …)

When conditional formatting is NOT the right answer

Colour is a signal, not a record. Three situations call for something else.

  • You need to count or total the flagged rows. Excel cannot sum by colour with a normal formula. Use a helper column with the same logic, such as =IF(AND(D2<TODAY(),E2=""),1,0), and sum that.
  • The sheet has tens of thousands of rows and many rules. Heavy rules using COUNTIF over full columns can slow a workbook. A helper column or a pivot table is faster.
  • People need an alert, not a colour. Conditional formatting does not email anyone. If a missed overdue invoice costs real money, use accounting software with reminders, or a workflow tool, and keep Excel for review.

Colour alone is also a problem for readers with colour blindness. Pair red and green with a text status or an icon set.

Frequently asked questions

How do I use conditional formatting in Excel?

Select your data, go to Home, Conditional Formatting and choose a built-in rule such as Highlight Cells Rules or Top/Bottom Rules. For custom logic, choose New Rule, then "Use a formula to determine which cells to format", type a formula that returns TRUE or FALSE, and pick a format.

How do I do conditional formatting based on another cell?

Use a formula rule that points at the other cell. Select the cells to colour, choose New Rule, Use a formula, and enter something like =$F2="Escalated". Lock the column with a dollar sign and leave the row open, and the colour follows the value in column F for each row.

How do I write an Excel conditional formatting formula?

Write the formula for the top-left cell of the selected range, and make it return TRUE or FALSE. Use dollar signs to lock the column when colouring a whole row, for example =$C2>$B2. Excel shifts the row reference for every other row automatically.

How do I highlight duplicates in Excel?

Select the range, then choose Home, Conditional Formatting, Highlight Cells Rules, Duplicate Values and pick a format. Both copies are coloured. For a whole-row highlight or a rule limited to one column, use a formula rule such as =COUNTIF($A$2:$A$500,$A2)>1 on the full table.

Why is my conditional formatting in Excel not working?

The usual causes are wrong dollar signs, a formula written for the wrong starting row, numbers or dates stored as text, and rule order. Open Manage Rules, check the Applies to range, and test the formula in a spare cell. If it returns FALSE there, the rule will not fire.

Can I use conditional formatting in Google Sheets as well?

Yes. Google Sheets has conditional formatting with a custom formula option, and the same logic works with small syntax changes. The Inventory and Reorder Point Tracker in Excel and Google Sheets ($6.99) ships in both editions, with the same tabs and formulas, so you can pick the tool your team uses.

How do I copy conditional formatting to other cells?

Select a cell that has the rule, click Format Painter on the Home tab, then drag across the target cells. Alternatively open Home, Conditional Formatting, Manage Rules and edit the Applies to box to include the new range. Check that dollar signs still point at the right columns.

How many conditional formatting rules can I use on one sheet?

Excel does not set a fixed small limit, so the practical limit is workbook speed. A sheet with a handful of rules over a few thousand rows is fine. If it slows down, narrow the Applies to ranges, avoid whole-column references, and move heavy logic into helper columns.

How do I remove conditional formatting?

Select the cells, then go to Home, Conditional Formatting, Clear Rules and choose Clear Rules from Selected Cells or Clear Rules from Entire Sheet. To remove only one rule, open Manage Rules, select it and click Delete Rule. Clearing rules does not delete any cell values.

Get more Excel conditional formatting templates

Start with the Dynamic Conditional Formatting in Excel template for $4.99. Its product page lists customizable formatting rules, real-time updates, and color scales, data bars and icon sets. If stock is your pain point, the Inventory and Reorder Point Tracker is $6.99.

Want a finished dashboard instead? Compare cheap Excel dashboard templates, read the guide to evaluating an Excel dashboard before you pay, or see the free options in free Excel dashboard templates. Video walkthroughs are on the Next Gen Templates YouTube channel.

🎓 Learn to build this yourself. Excel + AI Mastery: 100 Essential Formulas · $59 launch priceStart the course →
Scroll to Top