Firstly apologies for not putting my existing code on my post but it is on my work computer and I am not permitted to post from there.
I am trying to copy data from various Excel workbooks into a master sheet. I have reviewed loads of posts on here but can’t get these to work for what I am trying to achieve.
I am using the Applications.GetOpenFilename to allow users to select those files that they want to copy data from into the master spreadsheet (but not open them). They will open the master sheet manually and run the macro from a button on it. The master workbook has a tab called Consolidation which I need the data to be copied into. The file name of the master sheet will change every month so I have been using active worksheet for this. The Consolidation sheet will have headings which match those on the individual workbooks so I don’t want the headings copied.
The tab/sheet name from which I want to copy is called Key Control Testing Plan in each of the workbooks that I want to copy from.
I just can’t work out the code to loop through the files and copy and paste the data into the master sheet. The number of rows will differ for each so I need to find the last row each time and paste on the next blank row in the master sheet.
The headings are rows 1 and 2 in the individual files to copy from and in the consolidated sheet.
It is driving me mad and up against it timewise so I thought posting on here was the best way to get help from you Excel superbrains!
Thanks in advance!
I am trying to copy data from various Excel workbooks into a master sheet. I have reviewed loads of posts on here but can’t get these to work for what I am trying to achieve.
I am using the Applications.GetOpenFilename to allow users to select those files that they want to copy data from into the master spreadsheet (but not open them). They will open the master sheet manually and run the macro from a button on it. The master workbook has a tab called Consolidation which I need the data to be copied into. The file name of the master sheet will change every month so I have been using active worksheet for this. The Consolidation sheet will have headings which match those on the individual workbooks so I don’t want the headings copied.
The tab/sheet name from which I want to copy is called Key Control Testing Plan in each of the workbooks that I want to copy from.
I just can’t work out the code to loop through the files and copy and paste the data into the master sheet. The number of rows will differ for each so I need to find the last row each time and paste on the next blank row in the master sheet.
The headings are rows 1 and 2 in the individual files to copy from and in the consolidated sheet.
It is driving me mad and up against it timewise so I thought posting on here was the best way to get help from you Excel superbrains!
Thanks in advance!