VBA Copying data from multiple worksheets into a master worksheet

vba beg

New Member
Joined
Nov 22, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm trying to copy data from multiple workbooks into a one worksheet.

Essentially, I will receive multiple workbooks that contains a single sheet of data (data will be consistently located in B3:B6) and the name of the sheet will be different. I want to consolidate this data into one worksheet.

ie
Copy details from the first workbook (data located B3:B6) and paste it into a master workbook in (first data set to be pasted in A1:A4, second set of data pasted in B1:B4 and so on) and repeat this through all the selected files

Thanks in advance
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
If your workbooks are all in the same folder then use Powerquery: from the New Query, on the Get & Transform tab of the Data ribbon choose 'Get File', 'From Folder'. You'll then be asked to navigate to the folder and choose 'Edit'. It also means you can add additional workbooks simply by saving them in the folder and refreshing the workbook that collates them all.

Not the VBA solution you asked for, but much more powerful.
 
Upvote 0
I'm sorry I'm not able to find this/might not have access
 
Upvote 0
I managed to download the power query but this seems more complex that vba (maybe it's just me). I've managed to figure out the vba code to open multiple files but the issue that I'm now having is simply to copy the data from range B3:B6 from each workbook and pasted in in A1:A4
 
Upvote 0
It is different to via, but for what you’re trying to achieve Powerquery is so much better - definitely worthwhile exploring. There’s quite a bit available on line, my go to reference if ‘M is for (Data) Monkey’. Good luck
 
Upvote 0

Forum statistics

Threads
1,215,693
Messages
6,126,237
Members
449,304
Latest member
hagia_sofia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top