+ Reply to Thread
Results 1 to 11 of 11

Lookup 2 values to return 1 value

Hybrid View

  1. #1
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try...

    G8, confirmed with CONTROL+SHIFT+ENTER, copied across and down:

    =INDEX(A!$H$2:$H$83,MATCH(1,IF(A!$A$2:$A$83=$B8,IF(A!$B$2:$B$83=G$6,1)),0))

    Hope this helps!

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Hehe

    As usual, I found a clumsy way to make it work, but it's not 2003 compatible. I'll post it on the off chance you have 2007.

    Anyways, about Vlookup, the part that threw me off while trying to use it is the column reference.

    ie.
    =VLOOKUP(C10,A2:B83,2,FALSE)
    will take the information in C10, and look for a match for it in the left-most column of A2:B83 (It always searches the first, aka leftmost column of the selected area for matching data). It will then return information found in the 2nd column of that highlighted area (so if it found a match for C10 in cell A25, it would show the information in B25). The FALSE means it's looking for an exact match, and not an approximate one.

    Hope that helps!
    Attached Files Attached Files
    Last edited by mewingkitty; 11-19-2008 at 08:23 PM.

  3. #3
    Registered User
    Join Date
    11-18-2008
    Location
    australia
    Posts
    5

    Lookup 2 values to return 1 value

    Domenic hi..I copied your function into G8 and confirmed (}) but the dreaded #N/A appeared - did this happen when you did it?

    mewingkitty..thanks for your help, unfortunately I am using a 2003 version.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    you have real numbers not text numbers in g6:l6
    the rest of the two sheets are text numbers so you wont find a match

  5. #5
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    O rly?

    Cause with
    =IFERROR(IF(EXACT(VLOOKUP($B85,A!$A$2:$B$83,2,FALSE),J$6)=TRUE,"X",""),"")
    I get the attached picture as a result. Matches across the board.
    Attached Images Attached Images

  6. #6
    Registered User
    Join Date
    11-18-2008
    Location
    australia
    Posts
    5

    Lookup 2 values to return 1 value

    martindWilson - thanks for that observation I have now changed the formatting of the cells on both sheets to 'number', unfortunately I still can not get it to match!

    mewingkitty - thanks for sending your screenshot, when I try your error check I can not get that to work either, I am not sure what I am doing wrong; do you think it is a compatibility error as I am still using 2003?

    Thanks for your help
    Glen

+ 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