+ Reply to Thread
Results 1 to 3 of 3

VBA to Import Specific Range of data from multiple excel files into 1 excel file

  1. #1
    Registered User
    Join Date
    08-12-2015
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    9

    Question VBA to Import Specific Range of data from multiple excel files into 1 excel file

    Hi there,
    I am trying to create a macro which will allow me to import data from multiple excel sheets into one excel file but imported as separate worksheets within the file.

    For instance, I have 5 separate excel files all from different folder where the data provider will input the data on a monthly basis. I simply want to build a macro that will import the range of data (i do not want to import the headers just a specific range of data from these 5 separate files into 1 file but 5 tabs in the file).

    Summary Table:

    I want to automatically update the Main File by copying specific range from

    Worksheet 'Raw Data1' from File 1 and
    Worksheet 'Raw Data2' from File 2 and
    Worksheet 'Raw Data3' from File 3 and
    Worksheet 'Raw Data4' from File 4 and
    Worksheet 'Raw Data5' from File 5

    into

    Worksheet 'Raw Data1' in Main File
    Worksheet 'Raw Data2' in Main File
    Worksheet 'Raw Data3' in Main File
    Worksheet 'Raw Data4' in Main File
    Worksheet 'Raw Data5' in Main File

    Hope this makes sense. Any help will be appreciated!!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA to Import Specific Range of data from multiple excel files into 1 excel file

    Do the separate file vary in size or layout. If not why not simply link your Main File sheet cells to the relevant cells in the supporting files? You then avoid the need to import.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-12-2015
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    9

    Re: VBA to Import Specific Range of data from multiple excel files into 1 excel file

    Quote Originally Posted by Richard Buttrey View Post
    Do the separate file vary in size or layout. If not why not simply link your Main File sheet cells to the relevant cells in the supporting files? You then avoid the need to import.
    Hi Richard thanks for your prompt response. The files have the same layout but not all have same column name and varies in # of columns.

    I thought about creating external reference in the main file but as the file will be shared with peers I prefer to import via VBA code instead. Personally i have bad experiences with external reference (especially if you are sharing the file with peers) the chance of reference being invalid or broken is there.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Import multiple *.tsv files into one excel file
    By bing.pascual in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2013, 01:57 AM
  2. Import TXT files from a specific folder into Excel - TXT file names change hourly
    By jeepinjeff in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2013, 04:08 AM
  3. [SOLVED] Importing specific data from multiple text files in a file directory into excel
    By abat in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-03-2013, 05:26 PM
  4. Import data from multiple Excel files to 1 Excel file.
    By agengler11 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2012, 04:23 AM
  5. [SOLVED] Import specific data from multiple text files to an excel spreadsheet
    By westerp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2012, 04:51 PM
  6. Replies: 17
    Last Post: 12-06-2011, 11:50 AM
  7. How to import data from multiple Excel files to one Excel file
    By rafeemd in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2011, 12:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1