+ Reply to Thread
Results 1 to 2 of 2

Thread: VLOOKUP over multiple columns

  1. #1
    Registered User
    Join Date
    01-21-2011
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question VLOOKUP over multiple columns

    Hi

    I have 3 columns in a table, that I need to match up with in another worksheet.

    For instance:

    Sheet 1:
    A1 = 1
    B1 = 2
    C1 = 3

    Sheet 2:

    A50 = 1
    B50 = 2
    C50 = 3
    D50 = 6

    I've tried using VLOOKUP

    =VLOOKUP(A1:C1,'Sheet2'!A1:D1,4,FALSE)
    but this is not working and returns #VALUE! error

    Any ideas?

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: VLOOKUP over multiple columns

    A standard VLOOKUP would not suffice I'm afraid given multi conditional test.

    You could concatenate A:C on Sheet2 in a new column, say E:

    Sheet2!E1: 
    =A1&"@"&B1&"@"&C1
    copied down for all rows
    Then

    Sheet1!D1:
    =INDEX(Sheet2!$D:$D,MATCH(A1&"@"&B1&"@"&C1,Sheet2!$E:$E,0))
    If you opt against the concatenation you'd be looking at a less efficient approach, eg:

    =INDEX(Sheet2!$D$1:$D$100,MATCH(TRUE,INDEX(Sheet2!$A$1:$A$100&"@"&Sheet2!$B$1:$B$100&"@"&Sheet2!$C$1:$C$100=$A1&"@"&B1&"@"&C1,0),0))
    Note for the 2nd approach we restrict the ranges as much as possible given the inefficient nature of the calculation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0