In the code, below, I clear an area and then fill down with data from the row above the area that I cleared.
Dim LastRow As Long
LastRow = Application.CountA(ActiveSheet.Range(“W:W”)) + 4
Range(“P9:P” & LastRow).ClearContents
Range(“P8:P8”).Select
Selection.AutoFill Destination:=Range(“P8:P” & LastRow)
Worksheets(“projstart”).UsedRange.Columns(“P:P”).Calculate
I want to continue by applying the above code to a range using “End(xlToRight)” and “End(xlDown)”. I have gotten as far as the next 2 statements but do not know how to extend the range designation to the bottom of the block of data:
Range(“Y9:Y9”).Select
‘This extends the selection from cell B4 to the last cell in row four that contains data.
Range(“Y9”, Range(“Y9”).End(xlToRight)).Select
End(xlToRight)
Could someone please help.
Thanks
Stephen