E
el dee
Am trying to get my Autofill Macro to select the last filled cell in column A
and autofill down. The autofill must stop based on the data in column F.
For example, A has one entry and F has 10. I want "A" to autofill down to
the end of entries in "F, so I want A to fill down to 10. I have the
following code, but it is not executing...???
Thanks!
Sub AutoFill_Plot_Points()
Dim LastRow As Long
Dim RngToCopy As Range
Dim HowManyRows As Long
With Sheets("Plot_Point_Data")
LastRow = .Cells(.Rows.Count, "F").End(xlUp).Row
'using the last used cell in column A to get the row to copy
Set RngToCopy = .Cells(.Rows.Count, "A").End(xlUp)
HowManyRows = LastRow - RngToCopy.Row + 1
If HowManyRows > 1 Then
RngToCopy.Resize(HowManyRows, 4).FillDown
End If
End With
End Sub
and autofill down. The autofill must stop based on the data in column F.
For example, A has one entry and F has 10. I want "A" to autofill down to
the end of entries in "F, so I want A to fill down to 10. I have the
following code, but it is not executing...???
Thanks!
Sub AutoFill_Plot_Points()
Dim LastRow As Long
Dim RngToCopy As Range
Dim HowManyRows As Long
With Sheets("Plot_Point_Data")
LastRow = .Cells(.Rows.Count, "F").End(xlUp).Row
'using the last used cell in column A to get the row to copy
Set RngToCopy = .Cells(.Rows.Count, "A").End(xlUp)
HowManyRows = LastRow - RngToCopy.Row + 1
If HowManyRows > 1 Then
RngToCopy.Resize(HowManyRows, 4).FillDown
End If
End With
End Sub