+ Reply to Thread
Results 1 to 8 of 8

Extract data from multiple external excel files

  1. #1
    Registered User
    Join Date
    05-12-2015
    Location
    AU
    MS-Off Ver
    2010
    Posts
    58

    Extract data from multiple external excel files

    Hi ALL,

    I currently have an excel spreedsheet that track all drawings issued using formulas but as the number of drawings and stages of transmittals increases the file also increases. Drawing list and Transmittal list will be a DB_dump from our drafting software.

    I am just a novice to Excel Programming and I need help develop a routine to extract data from multiple external source.

    Workflow:
    1. evalauate DWG# from Trans# against Master Drawing Control register and extract Rev No. (see attached screenshots). Also attached the sample excel files.

    Trans3.xlsx
    Master Drawing Control Register.xlsx
    Trans2.xlsx
    Trans1.xlsx
    DWGLIST.jpg

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract data from multiple external excel files

    Maybe :

    Please Login or Register  to view this content.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Extract data from multiple external excel files

    Hi rxk,

    Your problem sounds like the reason they built "Power Queries". Read about them at:

    http://www.databasejournal.com/sqlet...for-excel.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    05-12-2015
    Location
    AU
    MS-Off Ver
    2010
    Posts
    58

    Re: Extract data from multiple external excel files

    @karedog
    I tested your code within the "Master Drawing Control Register.xlsm" and it works as intended. But when I moved the code to my Personal.xls file (located at excel start-up folder) which stores all my VBA/macro collection, it's not working, Is it possible to do this or it must be within the same worksheet.

    @MarvinP
    Thanks for the link.

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract data from multiple external excel files

    Try to change the word "ThisWorkbook" into "ActiveWorkbook" (2 occurences).

    It is not a good idea to move macro which worked for specific project to Personal.xls. Do it only for functions or subs that should work for general purpose.

  6. #6
    Registered User
    Join Date
    05-12-2015
    Location
    AU
    MS-Off Ver
    2010
    Posts
    58

    Re: Extract data from multiple external excel files

    What's the best way to clear all datas on the trans# column before update?

    This code works. Range("D7:G49").ClearContents but how to make the range dynamic?

    Thank you @karedog
    Last edited by rxk; 02-03-2016 at 05:35 PM.

  7. #7
    Registered User
    Join Date
    05-12-2015
    Location
    AU
    MS-Off Ver
    2010
    Posts
    58

    Re: Extract data from multiple external excel files

    I manage make it dynamic.
    Please Login or Register  to view this content.

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract data from multiple external excel files

    You are welcome, and thanks for the reputation point.

    You don't have to clear existing data first, because the array output size is set as the same size of output range, so all existing data will be totally overwrited by the output array.

    But if you want to know how to clear dynamic range manually, here is the way :

    Please Login or Register  to view this content.

+ 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. Extract data from Multiple excel files
    By rajani85 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2015, 02:48 PM
  2. Extract Data from Multiple Closed Excel Files
    By Gittelman in forum Excel General
    Replies: 2
    Last Post: 07-29-2014, 12:09 AM
  3. Extract Data from multiple excel files based on a Enquirer ID
    By pmyk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2013, 01:40 AM
  4. Extract Data From Multiple Excel Files -> One File
    By ozzabozza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2013, 10:20 AM
  5. Extract Data From Multiple Excel Files -> One File
    By Michael via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-24-2012, 01:02 PM
  6. Replies: 0
    Last Post: 06-17-2008, 12:39 PM
  7. Need advice : consolidating data from multiple CSV files in Excel - External data handling
    By Matthieu Gaillet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-01-2005, 05:10 AM

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