Home > Mobile >  Clear All Data EXCEPT First Row and First Column
Clear All Data EXCEPT First Row and First Column

Time:09-16

Would like to clear all data except Row 1 and Column A. Am able to clear all except the first row OR first column using something like this:

Rows("2:" & Rows.Count).ClearContents

But would like to know how to keep both in when clearing. (In the worksheet, the first row and column are both "frozen.")

CodePudding user response:

For example, clear B2 to the very last cell:

With ActiveSheet
   .Range("B2", .Cells(.Rows.Count, .Columns.Count)).ClearContents
End With
  • Related