+ Reply to Thread
Results 1 to 7 of 7

Pull retrieve data from multiple workbooks

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    80

    Pull retrieve data from multiple workbooks

    Hello, well I tried to follow a similar thread but as it grew more specific for those involved in the thread, it grew to be out of my comprehension. I am attempting to do a similar task.

    [Edited for clarification]

    The situation:
    There are upwards of 12,000 part numbers listed in 6 to 7 workbooks. Part numbers are 14 digit alpha-numeric.
    All part numbers start with "779", (the one's I'm interested in anyway. It would be useful to be able to alter this search criteria in the code for future use, or if someone else reading finds this useful.)
    All part numbers have a description next to them (most have a few more cells with more information)
    Some part numbers are in multiple workbooks (a user's unfinished attempt to consolidate) but has resulted in other users expanding on these areas. So there may be multiple iterations of the same part number across the workbooks.

    The Goal:
    Consolidate all these part numbers into one workbook.
    Over the past 3 weeks I've managed to do a simple copy/paste into one sheet then begin to organize with categories, options etc.
    We have instructed the users to NOT add or change the workbooks they were using because we are consolidating. They have NOT followed this instruction and have added more part numbers to the various workbooks. I don't know which have been added or changed, nor do I know where they have been added.


    I have my consolidated list of the Part numbers I’ve been working on for 3 weeks.
    I need to find the part numbers that were added to the old workbooks recently.
    I was thinking I could do this by pulling all cells that contain data starting with "779" from each of these workbooks into one workbook. One worksheet per book.

    The macro will search the workbooks I select. (See attached examples: Parts List 1, Parts List 2)
    After the macro runs there will be a new workbook "Gathered Part Numbers" if you will. Or the macro runs from a blank workbook. (See attached example: Gathered Part Numbers)
    It will contain a worksheet for each of the workbooks that was searched. Each of these worksheets will contain a list of all the part numbers starting with "779", no matter the location found in their respective workbook. And the part number's description. (Remember every part number has a cell directly to the right that has it's description.)

    I would then compare these lists to my consolidated list to see what is different, thus showing what has been added/changed.

    That's the idea anyway. I am open to any advice, tips, and help.

    As I said in OP:
    I'm very eager to (re)learn VBA so any comments and explanations as to what each function and step in the code is doing will be greatly appreciated. I'm truly enjoying and excited how helpful this community is, looking forward to feedback.

    [Edited to add attachments]
    Attached Files Attached Files
    Last edited by Fett2oo5; 03-08-2013 at 04:20 PM. Reason: clarification

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Pull retrieve data from multiple workbooks

    Do you have a sample file that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    12-17-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    80

    Re: Pull retrieve data from multiple workbooks

    Um, there is a lot of proprietary information but if you give me a little bit I can setup something that can serve as an example.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Pull retrieve data from multiple workbooks

    Sure, once you upload it, please post a note here, so i can check it.

  5. #5
    Registered User
    Join Date
    12-17-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    80

    Re: Pull retrieve data from multiple workbooks

    The situation:
    There are upwards of 12,000 part numbers listed in 6 to 7 workbooks.
    All part numbers start with "779", (the one's I'm interested in anyway. It would be useful to be able to alter this search criteria in the code for future use, or if someone else reading finds this useful.)
    All part numbers have a description next to them (most have a few more cells with more information)
    Some part numbers are in multiple workbooks (a user's unfinished attempt to consolidate) but has resulted in other users expanding on these areas. So there may be multiple iterations of the same part number across the workbooks.

    The Goal:
    Consolidate all these part numbers into one workbook.
    Over the past 3 weeks I've managed to do a simple copy/paste into one sheet then begin to organize with categories, options etc.
    We have instructed the users to NOT add or change the workbooks they were using because we are consolidating. They have NOT followed this instruction and have added more part numbers to the various workbooks. I don't know which have been added or changed, nor do I know where they have been added.


    I have my consolidated list of the Part numbers I’ve been working on for 3 weeks.
    I need to find the part numbers that were added to the old workbooks recently.
    I was thinking I could do this by pulling all cells that contain data starting with "779" from each of these workbooks into one workbook. One worksheet per book.

    The macro will search the workbooks I select. (See attached examples: Parts List 1, Parts List 2)
    After the macro runs there will be a new workbook "Gathered Part Numbers" if you will. Or the macro runs from a blank workbook. (See attached example: Gathered Part Numbers)
    It will contain a worksheet for each of the workbooks that was searched. Each of these worksheets will contain a list of all the part numbers starting with "779", no matter the location found in their respective workbook. And the part number's description. (Remember every part number has a cell directly to the right that has it's description.)

    I would then compare these lists to my consolidated list to see what is different, thus showing what has been added/changed.

    That's the idea anyway. I am open to any advice, tips, and help.

    As I said in OP:
    I'm very eager to (re)learn VBA so any comments and explanations as to what each function and step in the code is doing will be greatly appreciated. I'm truly enjoying and excited how helpful this community is, looking forward to feedback.

    I've also updated the OP with these attachments.
    Attached Files Attached Files
    Last edited by Fett2oo5; 03-08-2013 at 05:06 PM.

  6. #6
    Registered User
    Join Date
    12-17-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    80

    Re: Pull retrieve data from multiple workbooks

    Any Ideas? Sorry for bump, but I'm hurting for a solution.

  7. #7
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Ontario Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Pull retrieve data from multiple workbooks

    You can use this to open a workbook.

    Please Login or Register  to view this content.
    That way you can import all the data into one worksheet and have your code work on one sheet after that

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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