Hello all
This code clear cells in my worksheet called "Result"
In row 15 from column "C:AA" there is a header in each cell
If I run this code it clears everything ok but if I run it again it clears the header then every time I run it it starts clearing the row above.
I think it has something to do with the "C16:AA" & LR code line
Can anyone please spot my mistake
This code clear cells in my worksheet called "Result"
In row 15 from column "C:AA" there is a header in each cell
If I run this code it clears everything ok but if I run it again it clears the header then every time I run it it starts clearing the row above.
I think it has something to do with the "C16:AA" & LR code line
Can anyone please spot my mistake
Code:
Sub ClearContent()
Dim LR As Long
LR = Range("C" & Rows.Count).End(xlUp).Row
Sheets("Result").Range("D5:D13").ClearContents
Sheets("Result").Range("F5:F13").ClearContents
Sheets("Result").Range("C16:AA" & LR).ClearContents
End Sub