Reputation: 721
I have this for clearing everything past a specific row but I would like it to work with columns instead of rows. X in this case should be 6
With Sheets("Sheet1")
.Rows( X & ":" & .Rows.Count).ClearContents
End With
Upvotes: 0
Views: 36
Reputation: 3435
With Sheets("Sheet1")
.Range(.Cells(1,X).Address & ":" & .Cells(1,.Columns.Count).Address).Columns.ClearContents
End With
where X is the column number or letter you wish to start with.
Upvotes: 2