Forum Discussion
WayneEK
Oct 04, 2019Copper Contributor
Excel Table Size in Macro
Hi, I download external Excel information and run a macro I created for it. It works great. However, the external info I download grows every week with new rows and when I run the macro, the new row...
Smitty Smith
Microsoft
WayneEK You can set a variable to capture the last row of data then plug that in.
Dim lr as Long
lr = Cells(Rows.Count,"A").End(xlUp).Row
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$X$" & lr), , xlYes).Name ="Table1"
WayneEK
Oct 04, 2019Copper Contributor
Smitty Smith Thanks so much. Several responded with the same info and it worked. Very much appreciated.