So I am importing a bunch of data into a sheet and then I want to make it into a table. I do not know how many rows of data there will be. This code was working correctly a few days ago, but I suppose I might have unwittingly changed something. Here is the code:
Sheets("Enrollment Data Aggregate").ListObjects.Add(xlSrcRange, Range([A1].End(xlDown), "$n$1"), , xlYes).Name = "EDA_Table"
I am getting an error message that says "The worksheet data for a table needs to be on the same sheet as the table." As far as I know, I am making the table on the same page as where the data is. Any suggestions?