It appears that the problem occurs when you insert rows before row 1. Hopefully I can explain why, though I may not have the correct understanding myself, but I think it's close. When your code creates the conditions, it does so using relative row #1 ($G1, $I1, $H1). If you look at the conditional formatting in a cell in any row, it will still have 1 in the formula, which apparently points to itself (the cell's row) rather than actual row 1. If you insert rows after row 1, the conditions in those and subsequent rows still point to themselves. However, if you insert, say 3 rows before row 1, all the subsequent rows' conditional format formulas get bumped up by 3 rows, so they will then say $G4, $I4, and$H4. I don't totally understand it, but that's what is happening. You can address it by either not inserting rows before row 1, or by just rerunning your code after your insertion.
Bookmarks