Im trying to write some code to clear the contents and borders of columns A thru g with the exception of the first two rows which I want to remain. I think it is a simple one but I can't figure it out.
Thanks In Advance
Gary
Printable View
Im trying to write some code to clear the contents and borders of columns A thru g with the exception of the first two rows which I want to remain. I think it is a simple one but I can't figure it out.
Thanks In Advance
Gary
Try this:
[vba]
With Range("A3:G65536")
.ClearContents
.Borders.LineStyle = xlNone
End With
[/vba]
Thanks DRJ, I thought there would have been an easier way using entirecolumn or something like that.
Thanks Again
Yes, but entirecolumn would not allow retaining the status quo in rows 1 and 2 as you wished.
Ok, I thought maybe an exception for the two rows could be made. Thanks guys problem solved. I would mark this thread as solved but I can't find that tool anymore.
Once the board upgrades are resolved, we will mark it solved for you...the feature is temporarily unavailable.