Jul 14 2023 12:04 PM - edited Jul 14 2023 12:07 PM
Hi all,
I have a spreadsheet that I've created to clean and sort data to create a planner of sorts for my team. I have a lot of conditional formatting rules in the output sheet to keep things clean and easy to read, including a rule for row 1, which I've frozen as a header. The issue I'm having is that even though my macro is pasting only values into the output sheet, when I load updated data into the workbook, the range for my conditional formatting increases. Even though the range is expressed as $1:$1, after refresh, the range is $1:$5. Successive refreshes result in $1:$17, then 42, 90, and 208. The other rules are being messed with as well. I don't see a mathematical relationship between these numbers, and I have no clue why the formatting is being affected like this.
Please advise!
Jul 14 2023 03:52 PM
Jul 14 2023 08:26 PM
Here are a few possible reasons why your conditional formatting ranges are increasing on data refresh.
To troubleshoot the issue, you can try the following steps:
Here are some additional tips to help you prevent conditional formatting from changing:
The text and the steps are the result of various AI's put together.
My answers are voluntary and without guarantee!
Hope this will help you.
Jul 17 2023 06:25 AM
Jul 18 2023 05:33 AM
After reviewing my code and formatting rules, I've been unable to figure out a cause for this behavior. The formatting rules are written with absolute references, and while I do have code that inserts rows into the document, it does so to separate out events that occur on different dates, so when refreshing the data without changed entries, I would expect to see a predictable increase in the ranges, but this is not the case and the range increases far faster than the number of rows inserted. Additionally, if the code was interpreting the paste action as inserting rows, I would expect the initial increases in the format range to be much greater than they are. It's not the most elegant solution, but I've made a hidden sheet in the workbook to store my desired formatting, and my code now copies and pastes the formatting from that sheet to the operating sheet after performing the needed operations.