Hi,
I'm trying to create a macro that will work dynamically with the number of rows of data. To try and combat this I inserted a table to house the data, so that all of the references after would be more dynamic, but I've found myself stuck with the creation of the table, as it wants to use defined values (my code is below):
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$M$88"), , xlYes).Name = _
"Table1"
Can anyone help me to make the range dynamic so it will fit the table to the number of rows the data has (number of columns will always be consistent).
Hope you can help!
Thanks, Mat
I'm trying to create a macro that will work dynamically with the number of rows of data. To try and combat this I inserted a table to house the data, so that all of the references after would be more dynamic, but I've found myself stuck with the creation of the table, as it wants to use defined values (my code is below):
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$M$88"), , xlYes).Name = _
"Table1"
Can anyone help me to make the range dynamic so it will fit the table to the number of rows the data has (number of columns will always be consistent).
Hope you can help!
Thanks, Mat