+ Reply to Thread
Results 1 to 2 of 2

Extracting Data from multiple workbooks using ID number

  1. #1
    Registered User
    Join Date
    03-15-2015
    Location
    sg
    MS-Off Ver
    2011
    Posts
    1

    Extracting Data from multiple workbooks using ID number

    Hello!

    I am really new with VBA and have been trying to solve this problem for ages, but to no avail. I use a Mac Excel 2011. Would appreciate any help or advice!

    Essentially: I have a master folder of multiple excel files which have ID numbers, and various data such as Name, Description, Price and so on. The information is allocated in a table format, so column A has ID numbers, B has Names, etc. I would like to create a new excel file outside the folder which would allow me to key in ID numbers into a certain column. The VBA should match the ID with those in the master folder, and allow me to extract the corresponding and necessary information accordingly.

    1. Take 1 ID at a time from the list in Book1.xls
    2. Search the entire master folder, each file, column ____ until it finds a match.
    3. Once it finds a match, I can select copy columns ____ from matching workbook to ____ of book1.xls.
    4. Stop searching and go back to the list and get the next item to search again.

    Any advice is greatly appreciated!

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Extracting Data from multiple workbooks using ID number

    Since you can't interrupt a macro to allow you to do things such as selecting ranges, copying & pasting, what you're asking isn't possible. A macro could, however, automatically replicate the data, leaving you to clean up any unwanted updates post-execution. Alternatively, you may be able to build the logic into the code to have the macro either filter the data to be replicated or at least automatically select candidate ranges and give you a simple yes/no/cancel choice as to whether a given selection gets replicated.

    Also, the process you've outlined doesn't allow for the possibility that the same ID exists in multiple workbooks in the same folder. If that can occur, you'd need to continue processing all the workbooks in the master folder until no more matches are found - and have a strategy for selecting ranges, copying & pasting from multiple workbooks for the same ID.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

+ 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. Error when extracting information from multiple workbooks
    By mcnikal in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-17-2014, 07:50 AM
  2. How can I create a macro for extracting data from multiple workbooks within a folder
    By surfing69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 11:36 AM
  3. Replies: 0
    Last Post: 07-29-2013, 03:00 AM
  4. Extracting and combining data from specific sheet from multiple workbooks
    By aggies2010 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2013, 03:39 PM
  5. Extracting same column from large number of workbooks
    By BillC in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2005, 05:06 PM

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