Total VBA noob here, so bear with me, please. I have a workbook that has 67 columns, of which I only need the data of 14 columns pasted into a new worksheet and then is formatted into a table. This source workbook is updated daily with new rows of data that I would like to update the new worksheet and table with the update data.
My Current workflow is as follows: Download Source Workbook with updates. I copy the source workbook into MasterList, as is no modifications. I make sure to copy only rows and columns with data.
In the Master List Sheet I placed an Update button, so that it copies the columns I need from MasterList to MasterTable.
I found a solution that copies the data but it appears that it copies all of the rows whether they have data or not. Resulting in the new table having 100,000+ rows and really slowing down my excel app and hanging my system.
Here is the code that I am using to accomplish the copy and paste. I
Sub Button1_Click()
Worksheets("MasterList").Activate
Worksheets("MasterList").Range("I:I,J:J,K:K,L:L,M:M,N:N,S:S,X:X,Y:Y,Z:Z,AA:AA,AC:AC,AD:AD").Select
Selection.Copy
Worksheets("MasterTable").Activate
Worksheets("MasterTable").Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
If hiding the unnecessary columns weren't so tedious every time I get a new update I could live with that set up, but I am hoping there is a faster more efficient way to accomplish this.
I appreciate any directions or suggestions.