Hi all
I want to set lastrow always "> 4" and lastcolumn always ">6". I have code belovew and work well but I thinks have a better way to do. Could you have any suggession to do?
My code is:
Thanks./.
I want to set lastrow always "> 4" and lastcolumn always ">6". I have code belovew and work well but I thinks have a better way to do. Could you have any suggession to do?
My code is:
Code:
Sub clear()Dim lrow As Long, lcol As Long
Application.ScreenUpdating = False
With Sheets("result")
lrow = .Range("D" & .Rows.Count).End(xlUp).Row
lcol = .Cells(4, .Columns.Count).End(xlToLeft).Column
If lrow < 4 Then lrow = 4
If lcol < 6 Then lcol = 6
.Range(.Cells(4, 4), .Cells(lrow, lcol)).clear
End With
Application.ScreenUpdating = True
End Sub
Thanks./.