+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP based on two criteria

  1. #1
    Registered User
    Join Date
    04-24-2004
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    70

    VLOOKUP based on two criteria

    I am looking a function (may be vlookup) which can provide the value based on two conditions.

    I am attaching a xls file.

    When I use vlookup based on column A it gives wrong value because column A value are multiple in list.

    If I use use colun C the same problem is there.

    How can I use VLOOKUP (or any other function) based on two criteria (first column A and then column C) and get the column D value (batch)

    I am using XP.

    Please reply urgently as my boss has given me limited time


    thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: VLOOKUP based on two criteria

    Quick immediate response:
    use Concatenate on the two values, and use Concatenate on the reference data, repeat the vlookup...

    I'll post a response to sample workbook in a moment.
    Going for Guru! Click the Star to the bottom left of this post if I helped!

  3. #3
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: VLOOKUP based on two criteria

    find the attatche file

    note: array formula is used and should be confirmed thorugh Ctrl+Shift+Enter instead of simple enter
    Attached Files Attached Files
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  4. #4
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: VLOOKUP based on two criteria

    U may also use as suggested by miraun

    =INDEX(B!$D$3:$D$19,MATCH(A2&C2,INDEX(B!$A$3:$A$19&B!$C$3:$C$19,0),0)) and copy down

  5. #5
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: VLOOKUP based on two criteria

    This try :
    find the attatche file
    Using ISNA function to remove the error # N/A :
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: VLOOKUP based on two criteria

    The two tables provided are different dates... one is January, one is April. Originally I thought that it was a date formatting issue, but with the reference data provided, there's limited linkage.

    Azam's suggestion works absolutely perfectly if you cannot, or do not wish to, add the column to the reference data.

    Array formulas tend to be slightly more processor intensive than a function such as a vlookup, which solution you should use is completely up to you, based upon how much data you have, and whether or not it would be problematic to add in the concatenated key value to the reference data. It's kind of choosing the lesser of two evils, but only you can make that decision.

    And thanks for your solutions Azam... I rarely work with the array function, it's a great way to compare and learn. On each of these similar threads!

    This is excel, ask one question, and get 5 solutions!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: VLOOKUP based on two criteria

    If you want to use VLOOKUP funtion and not use array fomular funtion, You can use this file.
    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)

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