Guys, I have daily data pull fills Colum D Row count is always different. I am modifying the data pull through VB, and I also need to find the last cells in columns A:C and copy the data down to the last row in column D. I guess I want it to be dynamic so that as rows decrease/increase the data is only copied down to the final row/record. Below works, however, it starts at A2:C2 every time. Somedays I may have data that starts at A2:C2 while other days It will start at A25:C25 so I need this to be dynamic and pick up the last records in columns A:C.
Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "D").End(xlUp).Row
.Range("a2:C2").AutoFill Destination:=.Range("A2:C2" & LastRows & LastRow) _
, Type:=xlFillCopy
End With
End With
End Sub
Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "D").End(xlUp).Row
.Range("a2:C2").AutoFill Destination:=.Range("A2:C2" & LastRows & LastRow) _
, Type:=xlFillCopy
End With
End With
End Sub