I have tried to write code to clear data from sheet 11 to the last sheet from row A25 to the last row in Col H
The Formula clears data above this as well
I need the formula amended so that it only clears data from A25 to the last row containing data and also not to clear formulas
It would be appreciated if someone could assist me
The Formula clears data above this as well
I need the formula amended so that it only clears data from A25 to the last row containing data and also not to clear formulas
It would be appreciated if someone could assist me
Code:
Sub Clear_Branch_Data_Sheets()
Dim Sh As Worksheet
Dim LR As Long
For I = 11 To Worksheets.Count
With Worksheets(I)
For Each Sh In ActiveWorkbook.Worksheets
With Sh
LR = Cells(Rows.Count, "A").End(xlUp).Row
End With
Range("a25:H" & LR).ClearContents
Next Sh
End With
Next I
End Sub
Last edited: