sparky2205
Well-known Member
- Joined
- Feb 6, 2013
- Messages
- 507
- Office Version
- 365
- 2016
- Platform
- Windows
Hi folks,
I have a worksheet which contains data referencing different batches. The worksheet is password protected.
I provide the user with a button to run a macro to add new columns (3 each time) to add new data for additional batches.
I have conditional formatting on each of the columns which fragments when I perform the copy of the columns.
This I expected. However, the manner of the fragmentation I didn't expect.
The VBA for the copy copies the last 3 columns in the worksheet, inserts them to the right of the existing last populated column then clears the data from the newly copied columns except for formulas. The result is a new set of 3 'blank' columns.
When I looked at the conditional formatting I expected that the fracturing would have resulted in new rules for the newly created columns.
However, the newly created columns have been integrated into the existing rules but the original last 3 columns have fragmented.
Does anyone have an explanation for this behaviour?
Also, I presume it's a forlorn hope that anyone might have a way to avoid the fragmentation? My research would suggest I have to live with it. Although I did manage to prevent it when using VBA to add rows in a different project.
Thanks, as always, for any help.
I have a worksheet which contains data referencing different batches. The worksheet is password protected.
I provide the user with a button to run a macro to add new columns (3 each time) to add new data for additional batches.
I have conditional formatting on each of the columns which fragments when I perform the copy of the columns.
This I expected. However, the manner of the fragmentation I didn't expect.
The VBA for the copy copies the last 3 columns in the worksheet, inserts them to the right of the existing last populated column then clears the data from the newly copied columns except for formulas. The result is a new set of 3 'blank' columns.
When I looked at the conditional formatting I expected that the fracturing would have resulted in new rules for the newly created columns.
However, the newly created columns have been integrated into the existing rules but the original last 3 columns have fragmented.
Does anyone have an explanation for this behaviour?
Also, I presume it's a forlorn hope that anyone might have a way to avoid the fragmentation? My research would suggest I have to live with it. Although I did manage to prevent it when using VBA to add rows in a different project.
Thanks, as always, for any help.