buddy2000
02-12-2011, 11:51 AM
I need to clear contents of the row from "A3" to "D3". This is fixed it will not change.
How ever as the user inputs data I need to clear contents verically and this will change depending on how much data the user inputs. It could be "A3" to "D16" the last cell could be any number.
Here is what I tryed.
Sub Clear()
With Range("A3")
.End(xlToRight).Offset(0, 0).Cells.ClearContents
.End(xlDown).Offset(0, 0).Cells.ClearContents
End With
End Sub
This seems to be close it clears the last cell in one row and it clears the last cell in the first column.
How ever as the user inputs data I need to clear contents verically and this will change depending on how much data the user inputs. It could be "A3" to "D16" the last cell could be any number.
Here is what I tryed.
Sub Clear()
With Range("A3")
.End(xlToRight).Offset(0, 0).Cells.ClearContents
.End(xlDown).Offset(0, 0).Cells.ClearContents
End With
End Sub
This seems to be close it clears the last cell in one row and it clears the last cell in the first column.