+ Reply to Thread
Results 1 to 7 of 7

Vlookup with 3 criteria and closest match

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Vlookup with 3 criteria and closest match

    I have a document attached where I need to do a vlookup on 3 criteria and I don't know how to go about developing a formula for it.

    The first lookup I want to do is on the first column and match it with the value "Emu" and then on the 2 column I want to do a match on the colour "Red" and then with the lines that meet this criteria find the closest number to 76239 in the number column, and then bring back the return value in the next column. So the function in my example would bring back 11. Thanks so much for your help in advance


    animals.xlsx

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Vlookup with 3 criteria and closest match

    Does it have to be VLOOKUP?

    If it can be else try this array formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Array enter means the formula must be committed by simultaneously pressing and holding down Ctrl and Shift while hitting Enter. Helper cells F4, G4 and H4 contain "Emu", "Red" and 76239.
    Last edited by FlameRetired; 03-09-2015 at 10:05 PM.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Vlookup with 3 criteria and closest match

    Hi FlameRetired, this works fantastically and yeah it certainly doesn't have to be vlookup. I appreciate your help

  4. #4
    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: Vlookup with 3 criteria and closest match

    Array entered

    =INDEX(D4:D16,MATCH(MIN(IF((A4:A16="Emu")*(B4:B16="Red"),C4:C16)),C4:C16,0))

    ***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER
    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

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Vlookup with 3 criteria and closest match

    Glad to hear it. Thanks for the feedback.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,220

    Re: Vlookup with 3 criteria and closest match

    Hey - This took me about 15 tries..

    See my answer in this attachment.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Vlookup with 3 criteria and closest match

    Thanks so much Alkey and MarvinP, these work great and I appreciate your efforts!

+ 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: 2
    Last Post: 12-18-2014, 09:52 AM
  2. [SOLVED] Closest match on Multiple Criteria
    By rbetts in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-20-2014, 08:33 AM
  3. Replies: 6
    Last Post: 01-28-2012, 06:59 PM
  4. Replies: 2
    Last Post: 01-28-2012, 05:26 PM
  5. Finding a closest match with more than one criteria
    By Jayana in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-15-2011, 06: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