I have an Excel table with more data than is needed.
It is not currently possible to pre-populate the table with only the data I want.
I need to delete the unwanted rows. which are all but about 50.
I could loop through a few thousand rows and delete the unwanted rows.
But I can also use a SQL query to obtain the rows I want, then CopyFromRecordset into the first row of the table and then delete (via resize) the remaining rows below the query results.
(Unfortunately, it won't retain the query results in memory and allow me to clear the table before CopyFromRecordset)
Is there any downside to using SQL instead of looping?
Bookmarks