Deleting Columns in spreadsheet if column has not been edited.

goblue667

New Member
Joined
Aug 12, 2019
Messages
11
Hi I have a somewhat unusual question in my request here.

I have a spreadsheet where columns may be edited and if they have, I need to keep those and delete the rest. So if there were 45 rows, and only 1 of the 45 were edited, that whole column needs to be kept.

I have played around with the Review ribbon and added a Highlight Changes tool which displays a blue border around each cell that has been edited. Is there a way using VBA to delete those columns that do not have a blue border on them? Attached is a sample document of mine.
Capture.JPG
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Does the "Highlight Changes" tool simply change the cell properties to add a blue border if the cell has been altered? You could loop through each cell and look at the properties of that cell to determine if there are borders on. If you are using the actual cell properties to highlight changes though, it would make the coding easier if you used cell fill vs. borders as borders can sometimes get applied to adjacent cells too, which would cause confusion. If you can provide some more detail on your Highlight Changes tool, then I can mock up some VBA code
 
Upvote 0

Forum statistics

Threads
1,224,740
Messages
6,180,678
Members
452,993
Latest member
FDARYABEE

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top