Pull data from multiple workbooks to populate new workbook

Mikeymike_W

Board Regular
Joined
Feb 25, 2016
Messages
171
Hi,

I want to create a spreadsheet that will pull data from a form that my clients use.

There will be many of these forms and each one will have a slightly different file name but be stored in the same folder (C:\Users\MWa\Desktop\VBA Test\filename)

I want to copy the exact same cells from sheet 3 in the form to the new spreadsheet.

There will be many of these forms within the folder at one time. Can the code read all of these and add a new line in the spreadsheet for each form with one click?

I realise I'm asking a lot but I'm hoping the excel gods are watching over me :)

Many thanks in advance,

Mike
 
I found a way where it retrieves all values, however, for the second range it adds vertically instead of horisontally.

So currently it visulizes the data as below.

Sheet nr SalesCost
1200100
2300150
Worker IDSalary
11020
21119

Instead i want it as
Sheet nrSalesCostWorker IDSalary
12001001020
23001501119
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
To get the values in the same row you need to resize the range like
VBA Code:
Rng.Offset(, 10).Resize(, 10).Value
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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