I need to create a table in VBA for several thosand rows of data, however only with 3 columns. I need to run this daily, however the problem lies in the fact that Column A and Column B will vary in length each day, one day A will be longer, and the next the day B could be the longest, so I cant select the last row of a specific column, I need the last row of A:C
this is what I am currently using, however it is bugging out,
Sub CreateTable()
Dim lastRow As Long
Range("A:C" & lastRow).Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("a:c" & lastRow), , xlYes).Name = _
"Table9"
Range("Table9[#All]").Select
End Sub
Any help is appreciated, thanks!
Bookmarks