+ Reply to Thread
Results 1 to 8 of 8

Multi field use for lookup

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    NA, USA
    MS-Off Ver
    Excel 2010
    Posts
    41

    Multi field use for lookup

    I run a report every so often for the boss. The data I enter comes from a log system. We get three fields of data, but want to pull a lookup based on those three fields to have it fill in the others (Currently 10 fields, but that could change). The look up data we want to fill in is static, mostly. The goal is to run the report, get the three fields, and ensure that all items are there, or if there are new ones, that we can add them.

    Attached is an example. On the data input tab, I would past in the green fields, and yellow would pull from the lookup table tab.

    Can I do this with a vlookup? Was not sure as all three fields have to match.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: Multi field use for lookup

    In D2

    =INDEX('lookup table'!D$2:D$5,MATCH($A2&$B2&$C2,'lookup table'!$A$2:$A$5&'lookup table'!$B$2:$B$5&'lookup table'!$C$2:$C$5,0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Copy across

    ASSUMES the 3 criteria are unique i.e no multiple occurrences.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Multi field use for lookup

    John's formula modified as regular
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Multi field use for lookup

    A similar ARRAY FORMULA* (in D2). This one looks up the column heading, allowing for differences in order.
    I also used NAME MyTable ='lookup table'!$A$1:$G$5

    =INDEX(MyTable,MATCH($A2&$B2&$C2,INDEX(MyTable,0,1)&INDEX(MyTable,0,2)&INDEX(MyTable,0,3),0),MATCH(D$1,INDEX(MyTable,1,0),0))

    *Always press CTRL+SHIFT+ENTER to confirm entry after pasting or editing an ARRAY FORMULA in the Formula Bar.
    When copying the formula to other cells, make sure the copied cell is not part of the Paste Area.


    ...and here's a regular (non-array) formula (NOD to @AlKey- very nice):
    =INDEX(MyTable,INDEX(MATCH($A2&$B2&$C2,INDEX(MyTable,0,1)&INDEX(MyTable,0,2)&INDEX(MyTable,0,3),0),0),MATCH(D$1,INDEX(MyTable,1,0),0))


    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 06-22-2017 at 02:24 PM.

  5. #5
    Registered User
    Join Date
    03-20-2013
    Location
    NA, USA
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Multi field use for lookup

    leelnich,

    Sorry for the delay. Finally got time to get back to this. Your method works perfect.

    Is there a way to have the #N/A changed to something else, such as "Input Needed"?

    Thanks

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Multi field use for lookup

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-20-2013
    Location
    NA, USA
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Multi field use for lookup

    AlKey, Perfect, thank you

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: Multi field use for lookup

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Importing Multi-Value data into a lookup multivalue field.
    By Steven8294 in forum Access Tables & Databases
    Replies: 16
    Last Post: 09-24-2014, 12:08 AM
  2. [SOLVED] How to update multi-valued lookup field?
    By studiosa in forum Access Tables & Databases
    Replies: 2
    Last Post: 09-04-2013, 12:43 PM
  3. [SOLVED] Data Validation, Lookup, multi lookup, referancing and other.
    By archasem in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-04-2013, 10:50 AM
  4. multi valued field FROM clause
    By jalverson in forum Excel General
    Replies: 1
    Last Post: 05-22-2013, 10:07 PM
  5. [SOLVED] multi drop down list with multi-lookup
    By civileng12 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2012, 06:50 PM
  6. Replies: 9
    Last Post: 05-22-2012, 08:59 AM
  7. Lookup multi columns w/ multi answers
    By dec671 in forum Excel General
    Replies: 1
    Last Post: 01-28-2010, 04:48 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