Sub topic 14
Troubleshooting common problems
This chapter assumes you can create built-in and formula-based rules, understand relative, absolute and mixed references, and have opened the Conditional Formatting Rules Manager. Most rule failures come from a small set of causes. If you check them in a fixed order, you can usually find the problem in a few minutes.
A working model for diagnosis
Excel evaluates every rule for every cell in its Applies to range. For each cell, it takes the formula, shifts its relative references to match that cell's position, and checks whether the result is TRUE. If the result is TRUE, the rule's format is applied, unless a higher-priority rule overrides it.
A rule can therefore fail in four places:
- The cell is outside the Applies to range.
- The formula evaluates differently from what you expect, usually because of its references.
- The formula is correct, but another rule's format wins or stops evaluation.
- The data is not what it appears to be, such as text that looks like a number.
Step 1: Check the Applies to range
Open Home > Conditional Formatting > Manage Rules. Set Show formatting rules for to This Worksheet so you see every rule, not only those on the current selection. Then read the Applies to column for the rule in question.
Common range problems:
- The range was typed as
=$A$2:$E$50, but the data now runs to row 80. Extend the range to cover the new rows. Alternatively, apply the rule to whole columns or to an Excel Table, which grows automatically. - The range starts at the wrong row. The formula was written for A2 but the rule was applied to A1:E50. Every comparison is then shifted by one row.
- Copy, paste and row insertion have split one rule into several. The Rules Manager then shows the same formula repeated with fragmented ranges such as
=$A$2:$E$10,$A$14:$E$50. Merge them by editing one rule's range and deleting the others.
The formula in a rule is relative to the active cell at the moment you created or edited it, which is the top-left cell of the selection. If you select a range by dragging from the bottom, the active cell can be a different cell. The rule then looks shifted. Before writing a formula rule, click the first cell of the range so it is the active cell.
Step 2: Test the formula in the sheet
The formula box in a rule gives you no preview. A reliable technique is to write the formula in a spare column, fill it down, and see which rows return TRUE.
For example, suppose this rule is applied to $A$2:$E$50 and does not highlight what you expect:
=$C2>1000Put =$C2>1000 in cell G2 and fill it down to G50. If G2 shows FALSE for a row where C2 is clearly large, the problem is the data, not the rule. If G shows TRUE but the row is not shaded, the problem is range or precedence. Delete the helper column when you are done.
Reference mistakes
Reference errors are the most common cause of rules that look almost right. The table shows the symptoms.
| Symptom | Likely cause | Fix |
|---|---|---|
| Only column A is highlighted, not the whole row | The column reference is relative (`C2`), so it shifts in each column | Lock the column: `$C2` |
| Highlighting moves one row off | The active cell was not the first cell of the range | Reselect starting at the first cell, or edit the formula |
| Every row compares to the same cell | The row is locked (`$C$2`) | Unlock the row: `$C2` |
| Pattern is wrong only in later columns | Mixed reference has the wrong half locked | Decide which dimension must stay fixed, then lock only that |
| Duplicates rule counts the wrong range | The counting range is relative and drifts down | Fix the range: `$A$2:$A$100` |
For example, a duplicate check needs a fixed counting range and a relative row for the criterion:
=COUNTIF($A$2:$A$100,$A2)>1If you write =COUNTIF(A2:A100,A2)>1 instead, the counting range moves down as the rule is evaluated for each cell. Cell A50 is then compared with A50:A148, and most duplicates go unflagged.
A related trap is editing a formula in the rule dialog with the arrow keys. In Edit mode the arrow keys can insert a reference into the formula instead of moving the cursor. If you press F2 first, you toggle to Enter or Edit mode, and the arrows move the cursor. If you find the formula has changed to strange references after you navigated it, retype it.
Text, numbers and dates that are not what they seem
A rule that compares values only works if the values have the type you think they have.
- Numbers stored as text. A cell showing
1500that is left-aligned, or has a green triangle in its corner, is text. The comparison=$C2>1000treats text as greater than any number, so it returns TRUE for the wrong reason. Other rules, such as top 10, ignore text. Convert with Data > Text to Columns > Finish, or multiply by 1 with Paste Special. - Dates stored as text. A rule such as
=$D2<TODAY()returns FALSE for a text date because text is never less than a number. Check with=ISNUMBER(D2)in a spare cell. - Invisible characters. Trailing spaces make
"Done "differ from"Done". Test with=LEN(E2)or wrap the reference in TRIM:=TRIM($E2)<>"Done". - Blank cells that are not blank. A cell holding a formula that returns
""is not empty.ISBLANKreturns FALSE for it, but=$C2=""returns TRUE. Choose the test that matches what the cell actually contains.
The last point matters for incomplete-record rules:
=AND($B2<>"",$C2="")This works for both truly empty cells and cells holding "". If you used ISBLANK($C2) here, a formula returning "" would not be detected.
Also remember that an empty cell counts as 0 in numeric comparisons. A rule such as =$C2<100 highlights blank cells. Add a guard:
=AND($C2<>"",$C2<100)Date rules that behave unexpectedly
TODAY()recalculates when the workbook opens or recalculates. A rule that was correct yesterday changes today without any edit. This is expected.- Times matter. If a cell holds
2026-11-27 14:00, then=$D2=TODAY()is FALSE, becauseTODAY()has no time portion. Use=INT($D2)=TODAY(). - If automatic calculation is off (Formulas > Calculation Options), rules that depend on formulas may not update. Press F9 or switch to Automatic.
- The built-in A Date Occurring rule uses the system date, so a different computer can show different results if its clock is wrong.
For the overdue example, the full rule is:
=AND($D2<TODAY(), $E2<>"Done")If rows marked "Done" are still highlighted, check the spelling and trailing spaces in column E before you change the rule.
Rule precedence and conflicts
When several rules are TRUE for one cell, Excel applies all of them, but if two rules set the same property (for example, fill color), the rule higher in the list wins. Rules that set different properties, such as one for fill and one for bold font, combine.
Check the following:
- Order. In the Rules Manager, the top rule has the highest priority. Use the arrows to move a rule up.
- Stop If True. If a rule above has Stop If True checked and is TRUE for the cell, rules below it are skipped. Clear the box if you want them to run. Stop If True does not affect data bars, color scales or icon sets in some versions, so test your own workbook.
- Overlapping rules with different scope. A rule on one range and another on a larger range can both match. Set Show formatting rules for to This Worksheet to see all of them.
- Manual formatting. Conditional formatting overrides a cell's manual fill only when the rule is TRUE. If a cell shows a fill that you cannot explain and no rule explains it, select it and choose Home > Fill > No Fill, then see whether the rule colors it.
A built-in rule and a formula rule are the same kind of object in the manager. If a built-in "Greater Than" rule conflicts with your new formula rule, delete the one you do not need rather than trying to balance both.
Problems after copying, sorting and inserting
- Pasting normally copies the source cell's rules into the destination, which can add overlapping rules. Use Paste Special > Values when you want data without formatting, or Paste Special > Formats when you want only the rules.
- Sorting or filtering a range with formula rules is safe if the references are row-relative and column-locked, as in
=$C2>1000. A rule that references a specific row, such as$C$2, will highlight the wrong rows after a sort. - Deleting rows or columns that a rule's range covers shrinks the range. Deleting the entire range removes the rule.
- Clear a bad rule with Conditional Formatting > Clear Rules > Clear Rules from Selected Cells. To start over on the whole sheet, use Clear Rules from Entire Sheet. This cannot be undone after you save and close.
Performance
A workbook with thousands of rules, whole-column ranges and volatile functions such as TODAY() or OFFSET can feel slow. The most common cause is fragmentation: repeated copy and paste creates hundreds of identical rules with small ranges. Open the Rules Manager, merge them into a single rule with a combined range, and replace whole-column ranges with the actual data range or a Table.
A checklist
- Open the Rules Manager and show rules for This Worksheet.
- Read the Applies to range for the failing rule.
- Make the first cell of that range the active cell, then open Edit Rule and read the formula.
- Copy the formula to a spare column and check the results.
- Check for text values, trailing spaces and time portions in the data.
- Check rule order and Stop If True.
- Look for overlapping or duplicated rules and merge or delete them.
Exercise
A rule =C2>1000 is applied to $A$2:$E$50. You wanted the whole row highlighted when column C exceeds 1000, but only the cells in column C are shaded, and they appear to be compared against the wrong cells in other columns. What is wrong, and what is the corrected formula?
Show answer
The column reference is relative, so in column D the formula becomes =D2>1000, in column E =E2>1000, and so on. In column C itself it behaves correctly, which is why only column C looks right. Lock the column and leave the row relative: =$C2>1000.
Exercise
A rule =$D2<TODAY() should highlight overdue items, but a cell showing 12/03/2026 is never highlighted. Name two checks you can run to find out why.
Show answer
First, test =ISNUMBER(D2) in a spare cell. If it returns FALSE, the date is stored as text and the comparison never succeeds. Convert it to a real date. Second, test =D2<TODAY() in a helper column, and also check the Rules Manager to confirm that the cell is inside the rule's Applies to range and that no higher rule with Stop If True is stopping evaluation.