[Updated June 2018] I’m a big fan of Excel’s conditional formatting, and often use it to highlight cells on a worksheet. But this week I ran into a conditional formatting nightmare, and had to start from scratch. Fortunately, the fix didn’t take too long, but with complex formatting, things could have been much worse.
Separate the Dates in a List
There are lots of ways to use Excel conditional formatting. It’s useful for alerting people to problems, hiding duplicate values in a column, or even hiding cells’ contents, until related cells are filled correctly.
Earlier this year, I posted a tip for separating dates in a list, by using a red border at the start of a date change.

Easier to Read
It’s a technique that I use in one of my own workbooks, which I update every morning. The red border really makes the list easier to read, especially if I’m looking at it before my morning coffee!
The conditional formatting was set for cells A2:F9, and uses a simple formula to see if the date is equal to the date in the row above.

Quick Copy and Paste
In the workbook, I track some daily statistics for my website, and use the same headings every day. So, to save typing time, I copy and paste the headings from the day before.
For example, in the screen shot above, I could copy the regions and products headings from B2:C4, and paste them into cell B10:C12, for the latest day’s data.

The Excel table automatically expands to include the new rows, and fills in the formulas in column F. Awesome!
And that copy and paste trick is what I’ve been doing every day, for months on end.
Trouble With the Lines
Suddenly, this week, I started having trouble with the red border between dates – it wasn’t going across the full table.
So, I went into the Conditional Formatting Manager, to fix the problem. But, instead of one simple rule, there were hundreds of rules!
You can see the tiny scroll box at the bottom right in the screen shot below. That should give you some idea of how long that list was.

Every time that I copied and pasted within the conditional formatting range, it created another rule for the worksheet. Yikes!
Let’s take a look at the smaller example, where I just copied and pasted the Region and Product headings. Now, it has two rules, instead of one, after one copy and paste within the table.

Cleaning Up the Mess – UPDATED
UPDATE – March 2017: I’ve found a quicker way to fix the problem, as you can see in this video. Get the detailed steps on my Conditional Formatting page.
There is a full transcript of the tutorial following the video.
TRANSCRIPT FOR THE VIDEO
Conditional Formatting
In this workbook, I’ve got a couple conditional formatting rules, and I’m going to show you how those can get duplicated, so you end up with lots more rules than you started out with, and then how you can fix the problem.
So in this table I have two rules.
–One puts a line at the top of a date, if it’s different from the date above.
–The other rule changes the price to green, if it’s greater than $500 dollars.
We’ll take a look at those rules. In the Home tab, go to Conditional Formatting, Manage Rules.
And there you can see the two rules. They’re each applied from row 3 to 19 in this table.
–Now this one is just a cell value greater than 500.
–And this one is referring to a couple of cells. So if A2 is different from A3, we’re going to put a blue line, at the top of the cell.
How Problems Happen
And now, I’m going to insert a row, because I forgot to put in one of the records here. So I’ll click, Insert. And then just put some data in this row.
So that was a simple change to the table. And now I’m going to go back and look at my conditional formatting rules again. And suddenly I have a new rule, just for the row that I inserted.
So row 11 has its own rule, and the previous rule is still there, going from A3 to E10, and then A12 to E20. So it’s skipping this row, because that row has a separate rule.
And if you insert lots of rows, you can end up with hundreds of these rules set up, without even knowing it.
The Solution
And what I do to fix it is select all the rows, except for the first one. Then go to Conditional Formatting, Clear Rules, From Selected Cells.
Now if I go back in, and Manage Rules…I’ll go back to This Worksheet, just so we can see everything. So we’re back to those two original rules.
Then, I select the first row. I’ll select the first row in the table, this time, instead of the whole worksheet.
And go to the Format Painter, and make sure you’re selecting this first row as well, and apply that formatting to all the rows again.
And when we go back to Manage Rules, we still just have those two original rules.
If you need to do this frequently, go to my website to get a macro that removes the duplicate rules. It’s designed for data in in an Excel named table.
End Of Transcript
The previous solution is listed below, in case you’d rather try that.
Cleaning Up the Mess – ORIGINAL SOLUTION
I scrolled through the list, and deleted a few of the rules, but quickly realized that it would take far too long to delete all of them. So, to clean up the mess, I cleared the conditional formatting from the worksheet, and set it up again.

With all the extra rules gone, the conditional formatting borders were working correctly again.
Avoid Conditional Formatting Nightmare
Now, when I want to save some typing time in the daily list, I copy the previous headings, and use the Paste Values button to create the new records. I’ve got a copy of that button on Excel’s Quick Access Toolbar, so it’s easy to click.

That adds the text, and the table expands, including the formulas – but the conditional formatting doesn’t create a new rule.
Be careful out there — don’t let this conditional formatting nightmare happen to you!
Another Solution
Update: Thanks to Khushnood, who suggested leaving 3 blank rows at the bottom of the table, and inserting new rows above that, when adding new data.
Copy and pasting within the table doesn’t seem to produce the duplicate conditional formatting.
It’s still an extra step though, instead of a simple copy and paste.
________________
This is a great example of the possible issues arising from using the simple paste instead of paste special. When pasting normally, this could be more accurately called Paste ALL. There are over 80 ‘top level’ properties of a range, and more if you consider the collections of properties for each range. Paste All will bring over almost all of these properties.
The majority of the time, pasting without using paste special will not cause problems, but I am in the camp of pasting exactly what I want into the cell and not bringing any extra baggage along. I use paste values for the majority of my work, and the other paste special options such as pasting formulas, formats, or transpose are indispensable. I tried applying the new paste special option in 2010 (All merging conditional formatting) but it didn’t appear to handle the issue as I had hoped. I would agree that using paste special values is the most appropriate solution.
A quick tip on using the quick access toolbar:
No need to use a complicated keyboard shortcut to navigate the ribbon, and no need to create a shortcut key with VBA. As soon as you add an item to the quick access toolbar, it is assigned a shortcut key. I keep paste special values as the first item in the toolbar, so it has the shortcut ALT 1. The next item would be ALT 2, and so on.
Nice tip on Alt 1 for Quick Access Toolbar…cheers!
Nice tip on Alt 1 for Quick Access Toolbar…cheers!
Conditional formatting used to work in a logical way, and pasting cells carried absolute or relative conditional formatting as any informed user would expect, irrespective of how it was accomplished. However, failed attempts to improve the product by bloating it with useless excess as well as needless changes of conventions has created this problem. This kind of nightmare is typical of Microsoft – an authoritarian company that imposes its bloatware on suffering users everywhere. Each time a new often worthless and at times positively destructive tweak is added to a Microsoft product, millions of users must relearn how to use the software, and discover workarounds to the new bugs. This must be costing the world economy billions in lost productivity, of not trillions. This is the penalty we pay for the monopoly that Microsoft has become.
You are absolutely right. It was a breeze to make and use Conidtional Formatting in previous versions when there was no “applies to range”. As you said, the formatting worked when copied “in a logical way, and pasting cells carried absolute or relative conditional formatting as any informed user would expect”.
Now all rows refers to the formula for the first cell and gives unexpected results down below and there is no way to change it.
Agree. Conditional formatting should be simple. For the rules just write an if statement, or visual basic routine (I refuse to call them macros) just as one would for any cell calculation. The only difference being the output is the cell format. I find the preconfigured rules and formats utterly useless, and the means of writing and implementing a rule frustrating. It seems the programmers don’t follow exisiting Excel conventions or even use Excel. priro to this awful implementation I always wondered why conditional statements were so limited. Then they put this junk in.
I have been testing Office 2013 and this is still an issue… Some work books would get as big as 50 MB and after the cleanup back down to 35kb. lame…
Hello,
I hope you can help. I have 3 cells in a row. D4 (form number), E4 (case number), and F4 (score between 1-100).
I have set up conditional formatting for E4 successfully to change the color of the cell based on the value contained within it. 0-60, red; 61-70, orange; 71-80, yellow, 81-90, light green, and 91-100 dark green.
Fantastic, but now I want to match the conditional formatting of cells D4 and E4 to F4. So that based on F4’s number those cells change color too.
Logically, here’s what I have in my 5 formula bars for my 5 rules in conditional formatting:
=”e4=f4=>90″
=”e4=if(f4=>81,f4=70,f4=61,f4=<69)"
="e4=f4=<60"
But nothing happens. Please help. How do I get cells D4 and E4 to match the color conditional formatting for cell F4?
Weird, it posted the formula’s incorrectly.
Here they are:
=”e4=f4=>90″
=”e4=if(f4=>81,f4=70,f4=61,f4=<69)"
="e4=f4=<60"
Russell, try setting the “Applies to” field for each rule to: =$d4:$f4