Import Excel Files into single sheet from single directory

acc16

New Member
Joined
Aug 8, 2010
Messages
12
Hi,

I am positive that someone can provide help on my requirement.

Currently I am having around 50+ files in one single directory and would like to import only those files which are in present in the Excel Worksheets using VBA.

For example:
My files are in C:\Exceldump directory
Master Excel sheet name : MasterSheet.xls
Worksheets in MasterSheet.xls are: Sales, Mkt, Dist, Logist

Files which are present in the directory are: Mkt.xls, Dist.xls, Logist.xls, Airp.xls, Sims.xls, Sales.xls


Since only Sales, Mkt, Dist & Logist are in the worksheet, the VBA should be able to pick only these 4 files and import it.


Import Rule:
Since the first 9 columns (A to I) for every worksheet is having formula, the import vba should only start putting the values from Column J.

Urgent help is highly appreciated.
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,108
Office Version
365
Platform
Windows
There are lots of old threads in this forum that deal with this subject. If you use the Advanced Search functionality, you should be able to find lots of them. Post back if you have any trouble locating these.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,102
Messages
5,509,246
Members
408,718
Latest member
Bea2136

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top