+ Reply to Thread
Results 1 to 7 of 7

Vlookup with more than 1 condition

  1. #1
    Registered User
    Join Date
    12-28-2011
    Location
    Israel
    MS-Off Ver
    Excel 2007
    Posts
    18

    Vlookup with more than 1 condition

    Hi,

    Is there any way to use Vlookup for more than 1 parameter, or is there a similar function that i can use?
    For example I have columns showing Client name, client ID, client type, and location. I want to lookup the location of a specific client name + ID + type. One client name can have a few different IDs and types, so I need to be able to look for all 3 parameters.

    Thx!
    Last edited by yael; 05-03-2012 at 08:48 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Vlookup with more than 1 condition

    Hi
    Sheet1
    A2 Client name
    B2 ID
    C2 Type

    Sheet2
    A2 Client name
    B2 ID
    C2 Type
    D2 Location

    Try this =IFERROR(INDEX(Sheet2!$D$2:$D$100,MATCH(1,(A2=Sheet2!$A$2:$A$100)*(B2=Sheet2!$B$2:$B$100)*(C2=Sheet2!$C$2:$C$100),0)),"None!") Control+Shift+Enter together.
    If you don't want None in? )),"None!") remove to this )),"")
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  3. #3
    Registered User
    Join Date
    12-28-2011
    Location
    Israel
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Vlookup with more than 1 condition

    Hi,

    Thx for your quick reply. I can't get it to work though. I tried what you suggested (see excel attached) but it doesn't return the correct values. Can you take a look and see what I'm doing wrong?

    Thx
    Yael.
    Attached Files Attached Files

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Vlookup with more than 1 condition

    That's because you didn't comfirmed it with ctrl+shift+enter (instead of just enter) as micope21 told you.

    Here is non-array solution (normal enter): =INDEX(Sheet2!$D$2:$D$100, MATCH(A2& B2 & C2, INDEX(Sheet2!$A$2:$A$100 & Sheet2!$B$2:$B$100 &Sheet2!$C$2:$C$100, 0), 0))

  5. #5
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Vlookup with more than 1 condition

    Hi

    You need to do control+shift+enter to get the results.


    There Zbor formula without array.

    Reason I did this was put in none as sometime no results become none.

    Your choice.

    Micope21

  6. #6
    Registered User
    Join Date
    12-28-2011
    Location
    Israel
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Vlookup with more than 1 condition

    Thankyou both for your help!

  7. #7
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Vlookup with more than 1 condition

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

    Cheers

+ 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