+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP for Multiple Conditions

  1. #1
    Registered User
    Join Date
    07-31-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    20

    VLOOKUP for Multiple Conditions

    Hi,
    I am trying to extract data from a long list of records using a vlookup. The issue I am running into is that the matchup needs to be done on more than one criteria i.e. Need to validate if the Store #, Manager Name, Location match rather than just the store #.

    I must confess, I am relatively very new to excel but am learning fast - thanks in large amount to this excellent forum. I have posted a few queries and received some tremendous help. Thanks a lot to everyone who is so willing to share their expertise and knowledge.

    I have posted a sample file with a few examples of Master List and indicated the Desired Results ..

    Thanks in advance !
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: VLOOKUP for Multiple Conditions

    I have your file open and do not understand your desired results.

    What information is fixed, what is found from which table?

    Do you want first instance only, or maximum values or what?

  3. #3
    Registered User
    Join Date
    07-31-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: VLOOKUP for Multiple Conditions

    Sorry the file was not clear

    The Master List (Top Table would be the VLookup Table or Reference Table)

    Whereas the Database Records are the ones which need to be matched with the Master List. The Database Records will run into a couple of thousand lines

    Think I should have reversed the position of the two tables to help the flow

    I am trying to arrive at the Desired result by doing a match on the following criteria

    Item #, Sales Price, Location and Store Manager

    So in the example item # 1A, need to extract lines from the Database Record where

    Item = #1A
    Sales Price = $20
    Location = ABC
    Store Manager = Pete

    With this criteria the record in row 12 will be populated in the desired results field as 'All ' criteria are met whereas row 13 will not (as the location doesn't match the master list, even though other criteria are met).

    Hope this helps clarify - thanks once again for your help

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: VLOOKUP for Multiple Conditions

    NP

    Simple method:
    Add an extra column to concatenate the others so you have a single reference, then look that up...

    Insert a column at E:E
    E12=A12&B12&C12&D12
    copy down

    (assuming columns are moved over by one as a result of above)
    M20=VLOOKUP(I20&J20&K20&L20,E12:F17,2,0)
    copy down

    How's that for you?

  5. #5
    Registered User
    Join Date
    07-31-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: VLOOKUP for Multiple Conditions

    That looks great - however one slight issue, this pulls up only the record in cell M20 ie the inventory.

    I want the entire columns in the Desired result table to be populated with matchup ie item #, sales price, location and store manager - Is that possible

    Thanks again

  6. #6
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: VLOOKUP for Multiple Conditions

    see the example attached.
    values in columns I, J and K need to be filled from the master list, based on column H.
    The only item you need to find in datatbse is column L in the attached example.
    I am using a similar technique with concatenate function in column F [hidden].
    hope this helps.
    modytrane
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: VLOOKUP for Multiple Conditions

    Forgot to mention that columns I, J, K are filled in with vlookup function based on entry in column H.
    I have left H25 blank for you. fill it in with one of htree choices and see the rest of row fill in.
    modytrane

  8. #8
    Registered User
    Join Date
    07-31-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: VLOOKUP for Multiple Conditions

    Wow that solved the problem - you guys are wonderful !! Made my weekend thanks once again !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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