Copy data from many files.

Corall

New Member
Joined
Sep 30, 2019
Messages
21
Howdy,

How can I copy data from multiple files (between 2 and 5 files) from a folder on my desktop?
Every day I have to copy data, which are not arranged identically in each file, from sheet1 (each file has only one sheet), of each file found in the WORK folder.
In a file the data can be in the range C3: BA175, in another, in the range F5: AZ220 and so on (the first data row is the column name, C3: BA3 or F5: AZ5 etc ...).
I would like to copy that data (the data in each file will be copied in separate sheets, in the file where I run the VBA code).
Since the data is not identical in all files, I would like the "Name" column (which can be a rice column) to be copied to column A (starting with A2) and then all other columns.

Ex: In file 1, the data is in Range C3: BA175, the column "NAME" is - let's say - in Column D (in C3: BA3 are headers, and in D3 is "NAME"). This column will be copied to column A (A2), of each sheet (from the centralizing file) and then the other columns will be copied to B2: BA2.
If in file 2 the data is in the range F5: AZ220 and the column "NAME" is - let's say - in K5, the data will be copied to another sheet, but the column "NAME" will be copied to column A (A2).

Very complicated.
If someone can help me...
Thank you in advance.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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