+ Reply to Thread
Results 1 to 8 of 8

Vlookup with two criteria

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Vlookup with two criteria

    Is there a way to do a vlookup with two separate criteria?
    Last edited by mkvassh; 10-22-2009 at 07:56 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Vlookup with two criteria

    It can be made. Post an example
    Never use Merged Cells in Excel

  3. #3
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Vlookup with two criteria

    I have the following content in column A, B and C

    Cost element Cost object Area
    709015 WTK.RND.0360.EN.EX Other
    972236 WTK.RND.0360.EN.EX Drilling & Production
    972261 WTK.RND.0360.EN.EX Drilling & Production
    979455 WTK.RND.0360.EN.EX Upstream Technology
    709015 WTK.RND.0360.EN.PR Other
    972237 WTK.RND.0360.EN.PR Drilling & Production
    972260 WTK.RND.0360.EN.PR Drilling & Production
    977745 WTK.RND.0360.EN.PR Project Development
    979456 WTK.RND.0360.EN.PR Upstream Technology
    979508 WTK.RND.0360.EN.PR Other
    709015 WTK.RND.0371.EN.EX Credit
    709015 WTK.RND.0371.EN.PR Credit
    I want to lookup the content of column C if there is match with the content in A and B combined. Lookup values for A and B will be in Z1 and Z2. An array function is OK.
    Last edited by mkvassh; 10-22-2009 at 07:44 AM.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup with two criteria

    Try

    =Index($C$1:$C$100,Match(1,Index(($A$1:$A$100=Z1)*($B$1:$B$100=Z2),0),0))

    adjust ranges to suit
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Vlookup with two criteria

    It works. Is it not possible to do this with a Vlookup-function?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup with two criteria

    It is, but you would need to have a helper column inbetween, which concatenates columns A and B, and then you can use something like

    =Vlookup(Z1&Z2,$C$1:$D$100,2,0)

    where column C contains concatenated columns A&B and Column D is the column to index.

  7. #7
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Vlookup with two criteria

    Thank you :-)

  8. #8
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Vlookup with two criteria

    I found a Vlookup array function on Internet. It will work as well

    =VLOOKUP(E1,IF($B$1:$B$2=F1,$A1:$C$2,""),3,FALSE)
    Press CTRL-SHIFT-ENTER together to enter this.

    Click here if you want to check the place I found this. I haven't adjusted the function to fit the problem above.
    Last edited by mkvassh; 10-22-2009 at 08:24 AM.

+ 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