+ Reply to Thread
Results 1 to 4 of 4

Nested VLOOKUPS with a searched, moving range

  1. #1
    Registered User
    Join Date
    07-12-2006
    Location
    Ohio
    MS-Off Ver
    Newest
    Posts
    49

    Nested VLOOKUPS with a searched, moving range

    I can't wrap my head around what the formula would be.

    I need to fill in the "??" cells with the corresponding price from Table 2.

    So I need to search for "Product A" in Column A of Table 2, then shift over and look for "Option A" in either Table 2's Column B or Column C.

    The option being looked for from Table 1, Column B can never be found in both Column B and C from Table 2. You'll never see a flipped set of options in Column B and C (e.g. you'll never see Option 1, Option 2 AND Option 2, Option 1.

    Seems like some kind of combination of MATCH, INDEX, and maybe VLOOKUP might work. I just can't wrap my head around it.

    TABLE 1
    Column A Column B Column C
    Product A Option A ??
    Product A Option 1 ??

    TABLE 2
    Column A Column B Column C Column D
    Product A Option A Option 1 $0
    Product B Option A Option 2 $10
    Product C Option B Option 2 $11
    Product D Option B Option 3 $12
    Last edited by OlYeller21; 08-21-2019 at 10:35 AM. Reason: Solved

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Best Way To Cross Reference

    It would help if you attached a sample Excel workbook, so we can see how your data is laid out.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-12-2006
    Location
    Ohio
    MS-Off Ver
    Newest
    Posts
    49

    Re: Best Way To Cross Reference

    I ended up figuring this out. Sorry I wasn't able to come back to share data. It would have taken my hours to scrub it to be able to share it. I know my quick example wasn't super informative.

    In case anyone runs into something similar:

    I was basically doing 2 references (nested VLOOKUPs). The first line looked for a search key but needed to not only return the first time it was found but also the last time it was found. The second lookup then searched that range.

    So the range of the outermost VLOOKUP needed to move based on another search.

    I ended up using INDIRECT to build the moving reference range using MATCH. It's setup to search for the first and last time a search key is found which becomes the start and end of the outermost VLOOKUP.

    In my case, if it wasn't found in the first index, an IFERROR was used to find it in the second. But that part is super specific to my data. I can't image anyone else using that.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Best Way To Cross Reference

    Thanks for telling us how you solved it (and for the rep).

    Pete

+ 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. Need to cross reference
    By Smorg1966 in forum Excel General
    Replies: 3
    Last Post: 06-19-2014, 02:55 PM
  2. [SOLVED] I need to cross reference from one tab to another
    By TomRet in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 01-22-2014, 01:09 AM
  3. [SOLVED] Cross Reference For SSN
    By thriftyhiker in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-16-2014, 07:57 AM
  4. [SOLVED] Cross reference with multiple instances in reference data
    By Nick F in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-08-2013, 10:31 AM
  5. Cross reference?
    By soothsayer17 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-07-2011, 11:22 AM
  6. Cross reference
    By DRFLETT in forum Excel General
    Replies: 2
    Last Post: 11-20-2007, 09:23 AM
  7. Cross Reference
    By fbm2themex in forum Excel General
    Replies: 2
    Last Post: 09-07-2007, 07:03 AM

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