Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88126

Error creating table in VBA Excel

$
0
0

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?


Viewing all articles
Browse latest Browse all 88126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>