+ Reply to Thread
Results 1 to 5 of 5

Vlookup using two columns-needs to match the first two column

  1. #1
    Registered User
    Join Date
    03-18-2008
    Posts
    8

    Vlookup using two columns-needs to match the first two column

    Hello,

    I have five columns of information, a location ID, an account and a value in the next three columns. I need to be able to vlookup the information into another sheet in the workbook, but without concatenating the first two columns together.

    The sheets look something like this:

    Sheet 1

    Location#1 11111 20 40 60
    Location#1 22222 30 50 70
    Location#1 33333 35 55 75
    Location#2 11111 10 20 30
    Location#2 22222 20 30 40
    Location#2 33333 25 35 45
    Location#3 11111 70 80 90
    Location#3 22222 10 20 30
    Location#3 33333 65 75 85

    Sheet 2

    Location#1 11111 vlookup vlookup vlookup
    Location#1 22222 vlookup vlookup vlookup
    Location#1 33333 vlookup vlookup vlookup
    Location#2 11111 vlookup vlookup vlookup
    Location#2 22222 vlookup vlookup vlookup
    Location#2 33333 vlookup vlookup vlookup
    Location#3 11111 vlookup vlookup vlookup
    Location#3 22222 vlookup vlookup vlookup
    Location#3 33333 vlookup vlookup vlookup

    The formula needs to match the first two column info and then return the value in the third column of the second sheet.

    Thank you for the help!

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Assuming the data is on Sheet1 starting in A2, and the 2 rows to be looked up are on Sheet2 starting in A2, use the following on Sheet2 cell C2 and copy over and down:
    Please Login or Register  to view this content.
    HTH

    Jason

  3. #3
    Registered User
    Join Date
    03-18-2008
    Posts
    8
    I don't want to modify the values in the cells, I just would like to look them up. I don't want the values to be multiplied.

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    The easiest way I know of to do it (might be a better way out there) is to have a helper column inserted in sheet2 after column B. Then, in C1, =A&B1 and drag down.
    For your first sheet in C1, =VLOOKUP(A1&B1,Sheet2!$C$1:$G$100,Column()-1,False). You can drag this over and down.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by pduubb
    I don't want to modify the values in the cells, I just would like to look them up. I don't want the values to be multiplied.
    Have you tried implementing jasoncw's formula?

    Although Sumproduct multiplies arrays, in this case the first 2 arrays are made up of 1's and 0's and so the values in column C will be multiplied only by 1's and/or 0's. ....only where a match in both conditional columns occur will there be two corresponding 1's that will be multiplied by the corresponding value in column C....thereby returning the actual value in C that matches columns A and B.

    Note: This only works if you are trying to return a number from column C. If you have text there, then another method is required.
    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.

+ 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