+ Reply to Thread
Results 1 to 5 of 5

How would I go about creating a Macro/Script that would pull from 3 different workbooks?

  1. #1
    Registered User
    Join Date
    04-15-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    How would I go about creating a Macro/Script that would pull from 3 different workbooks?

    How would I go about creating a Macro/Script that would pull from 3 different workbooks?
    So, I would enter a phone number, then auto-populate the rest.

    For instance, If I put in a phone number in A2, then it would pull the number and a certain_ID from one workbook, and pull separate info from workbook 2 and 3 and populate into one row on the main spreadsheet.

    Thank you in advance,
    Last edited by OutRightWar; 04-23-2012 at 11:28 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: How would I go about creating a Macro/Script that would pull from 3 different workbook

    Hi
    Upload sample data...
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Registered User
    Join Date
    04-15-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How would I go about creating a Macro/Script that would pull from 3 different workbook

    Sorry took so long to respond. I am attaching two sample workbooks and one titled "Test_Main." The Main is the workbook that I am trying to set up and pull info from the other two. The other two are, "Account_Test", and "Application_Test."

    Once a telephone number is entered into the Main page, it should pull the "Main_Phone_Num", and the "ERP_ID." from the "Account_Test" page, and then pull the rest of the info from the "Application_Test" page. The common Identifier on all three workbooks is "ERP_ID."

    Thank you again Jraj1106
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-15-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How would I go about creating a Macro/Script that would pull from 3 different workbook

    Please let me know if anyone needs additional information. I have looked at the "Private Function GetValue(path, file, sheet, ref)", but not sure if I am on the right track? Any info would help

    Thanks again,

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: How would I go about creating a Macro/Script that would pull from 3 different workbook

    Two things:

    1. Include actual sample data, not just a bunch of x's in random columns in your workbooks. The sample data can be fake, but it should mimic the type and location of your real data in the workbooks. We don't need 50,000 rows of sample data either, just enough to get the gist of what you're looking to do. Your sample workbook should also show the results you would expect - and explain why those are the results you would expect.

    2. Without even seeing real data, you should be able to just use VLOOKUP functions, which work perfectly fine on open or closed workbooks. You just need to include the full path to the other workbooks so it can read them when they are closed. If VLOOKUP doesn't fit your worksheet layouts, then perhaps INDEX/MATCH functions will. (Perform similar to VLOOKUP, but can look in either direction, not just left to right.)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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