+ Reply to Thread
Results 1 to 4 of 4

How to Lookup on External Data Source?

  1. #1
    Registered User
    Join Date
    12-10-2010
    Location
    California
    MS-Off Ver
    Excel all versions from 5.0 (1993) to 365
    Posts
    38

    How to Lookup on External Data Source?

    How to do a lookup against external data?

    I have a Stores table on an Excel sheet. The Manager column is blank:

    Stores (on worksheet):
    Store_Number | City | Manager
    1 | Rye |
    2 | Rye |
    3 | Derby |
    4 | Napa |


    There's an external data-source containing the Managers table:

    Managers (external):
    City | Manager
    Rye | Joe Smith
    Derby | Sue Jones
    Napa | Lizzy Borden

    How can i populate the Manager field in the Stores table from that external source? The name displayed in the Stores!Manager column should automatically update if user enters different city into City column.

    I can't load that external source onto a sheet. Assume it's 10 million records. I think there are a few ways to connect to it from Excel:

    - Get external data button
    - New query button
    - Connections


    I think there are some possible solutions:

    - create a relationship between the two tables
    - data model
    - a cell formula which does a lookup against the external data
    - VBA UDF which executes SQL statement against the external data
    - Power Query
    - Power Pivot

    But i'm not trying to pivot. It's just a lookup.

    i like relationship or data-model join, because it's very intuitive and drag-drop.
    Seems this scenario shouldn't require a UDF.
    i can't figure out if a worksheet formula, like DGET, can use external datasource as the lookup table.

    Also asked here:
    https://www.mrexcel.com/board/thread...ource.1185564/
    Last edited by johnywhy; 10-23-2021 at 11:44 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: How to Lookup on External Data Source?

    Hi,

    load both data to datamodel and make a relation between them
    then add a column to the big data and get the related manager


    if its 10 mil as you say you will need a pivot so you can filter and make it visible in excel


    note that a city can not have 2 managers, you will need to make the key this case the city more unique by maybe adding the store number to it and relate it that way
    Last edited by Joske920; 10-23-2021 at 03:30 PM.
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

  3. #3
    Registered User
    Join Date
    12-10-2010
    Location
    California
    MS-Off Ver
    Excel all versions from 5.0 (1993) to 365
    Posts
    38

    Re: How to Lookup on External Data Source?

    Thx for reply.
    Quote Originally Posted by Joske920 View Post
    then add a column to the big data
    I don't know what that means.

    if its 10 mil as you say you will need a pivot so you can filter and make it visible in excel.
    i think the purpose of a pivot isn't "cuz you have a lot of records", the purpose of a pivot is to show roll-ups. I'm not trying to show rollups, just lookups. The lookup is 10 mil, not the displayed table. Assume the Stores table is only 4 records.

    a city can not have 2 managers
    True -- my example data above doesn't tho.

    thx
    Last edited by johnywhy; 10-23-2021 at 04:00 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: How to Lookup on External Data Source?

    take a look at this example

    maybe this gives you an idea
    Attached Files Attached Files

+ 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. Replies: 0
    Last Post: 01-23-2020, 05:45 PM
  2. SUM(IF) vs External source and partial lookup
    By Diss in forum Excel General
    Replies: 2
    Last Post: 08-16-2017, 07:05 AM
  3. Data from External Source
    By HarryGreenwood in forum Excel General
    Replies: 2
    Last Post: 01-27-2015, 10:08 AM
  4. Replies: 5
    Last Post: 03-26-2014, 08:30 AM
  5. Replies: 5
    Last Post: 07-29-2012, 04:42 PM
  6. Getting data from external csv source
    By ajocius1 in forum Excel General
    Replies: 1
    Last Post: 07-18-2008, 10:52 AM
  7. [SOLVED] External Data Source
    By S Walker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2005, 12:45 PM

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