+ Reply to Thread
Results 1 to 8 of 8

Look up data in different datasets by a cell value

  1. #1
    Registered User
    Join Date
    05-31-2025
    Location
    Long Island, NY
    MS-Off Ver
    365
    Posts
    3

    Look up data in different datasets by a cell value

    I have a sheet I made. I used "indirect" function to provide dropdown lists. First selection company, second category, third specific product. From there I need to pull specific data in each cell like sku, color, and cost. Vlookup cant handle that many perameters. Issue is that each company uses a different range. Is there a way to do this? VBA? 5 Different distributors. Any ideas so I dont have to specifically name the prod by company?


    Company 1 data is data sheet a1 to h100
    Company 2 ...A100 to H200
    Etc...




    Screenshot 2025-05-31 at 9.51.12 AM.png

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2507 Win 11
    Posts
    24,922

    Re: Look up data in different datasets by a cell value

    Hi and welcome to the forum

    Pictures are of little value. Honestly, no one wants to re-type your data to try and solve your issue. Additionally, we would only be guessing at how your data was structured, ie. formulas, formatting, etc. Additionally, due to how some browsers behave, many of our members cannot see uploaded pictures/images. Please do not take this route.

    Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not) and an "After" of what you wish the output to be.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-31-2025
    Location
    Long Island, NY
    MS-Off Ver
    365
    Posts
    3

    Re: Look up data in different datasets by a cell value

    I have a sheet I made. I used "indirect" function to provide dropdown lists. First selection company, second category, third specific product. From there I need to pull specific data in each cell like sku, color, and cost. Vlookup cant handle that many perameters. Issue is that each company uses a different range. Is there a way to do this? VBA? 5 Different distributors. Any ideas so I dont have to specifically name the prod by company?


    Company 1 data is data sheet a1 to h100
    Company 2 ...A100 to H200
    Etc...

    There is a file with the form and data attached. The original sheet I wrote worked perfectly but there was only one distributor. Now I have multiple distis with thier own sku etc. Products may be the same. Im trying to fill info in column e-h for example
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2507 Win 11
    Posts
    24,922

    Re: Look up data in different datasets by a cell value

    First question before I start:
    Why do you have Column A and Column C which appear to be replication of the each other?

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,531

    Re: Look up data in different datasets by a cell value

    This is a textbook example on how to NOT setup a datatable in Excel. You have let design come before efficiency.
    As you have noticed now this kind of setup only creates problems in the future when you have to do lookups.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  6. #6
    Registered User
    Join Date
    05-31-2025
    Location
    Long Island, NY
    MS-Off Ver
    365
    Posts
    3

    Re: Look up data in different datasets by a cell value

    bakerman2 Thanks but that really doesn't help what I trying to achieve. I'm here because I didn't know.

    Alansidman, when I originally designed this Col A was tables for drop downs. C was the first column of the dataset that I was looking up. Definitely an unneeded step. This worked perfectly for what I needed until I had to add multiple distributors with their own products. Many distributors sell the same supplies but have different SKU's and cost. Can vlookup be pointed to a table where the table name is set by the distributor column?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,363

    Re: Look up data in different datasets by a cell value

    This proposal will require a bit of manual work be done on the Disti Pricelist sheet
    1. Column K populated with the Disti
    2. Column L populated with the category
    If those are done then the following formula will work for columns E:H on the General price sheet:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2507 Win 11
    Posts
    24,922

    Re: Look up data in different datasets by a cell value

    I have built a Power Query parameter as shown in the attached.

    Use the lookups and then click on data Refresh All.
    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. Reconciling data from 2 datasets
    By msa722 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2022, 02:02 AM
  2. Replies: 0
    Last Post: 01-21-2019, 12:54 PM
  3. Replies: 0
    Last Post: 03-15-2018, 10:27 AM
  4. [SOLVED] Macro to combine data from two datasets based on matching strings
    By mfd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2014, 03:23 PM
  5. [SOLVED] VBA - Creating contiguous datasets (through row insert and applying cell value offset)
    By smutimer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 02:05 AM
  6. Replies: 14
    Last Post: 12-17-2012, 11:12 PM
  7. Replies: 2
    Last Post: 06-26-2012, 05:09 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