After watching your video @Mynda on Youtube 'SOLVED - Stop Conditional Formatting Duplicating & Fragmenting' Ive a question:
It seems the solution is only for references to other cells. How do I prevent fragmentation when using a formula? For example:
=AND($C8>=TODAY();$C8<TODAY()+28)
or simply:
=$F8="v"
I'm curious what works here to prevent the formatting from fragmenting.
That formula shouldn't fragment on inserting rows as it doesn't reference rows above/below itself. If you are pasting in data, then you must use Paste Special > then either formulas or values so as not to overwrite the conditional formatting rule = this problem is different to fragmenting from inserting /deleting rows.
Hi, thanks for your reply. Unfortunately, the fragmentation is happening in my file. I've added the file.
In the file, I want to prevent a student from having multiple exams on a single day. So, I'm counting the dates and the student number. If that's >1, then the student has more exams on a single day, and the cells should be colored orange.
Something else is happening in the file: only the first cells of the layout are orange; cells C4 and C8 should also be orange. Where's the error?
Please try uploading your file again. It didn't come through. Otherwise, save it to OneDrive or similar and share the link that gives full access to it.
SOLVED - Stop Conditional Formatting Duplicating ^0 Fragmenting.xlsx
(Dutch version)
Your issue has nothing to do with the fragmentation and duplication phenomena described in the video. Change the rule to:
=COUNTIFS($C$2:$C$9,$C2,$D$2:$D$9,$D2)>1
It's important that you make the bolded references absolute for both the column and the row, otherwise the rule will look at C3:C10 and D3:D10 for row 3 etc (increasing the row numbers for every next row). I've demonstrated that in F2 in the attached file and copied the formula down. Conditional Formatting will apply the same logic.
Always good to test your rule(s) as regular formulas to verify that they return the correct result.
With the corrected rule the result will be like this:
Attached your file including the change.