+ Reply to Thread
Results 1 to 8 of 8

Trying to use VLOOKUP with 2 matches?

  1. #1
    Registered User
    Join Date
    07-12-2006
    Posts
    69

    Trying to use VLOOKUP with 2 matches?

    I have two columns in which I want to match BOTH columns, and then VLOOKUP would return the third column's value. But I'm not sure if this is possible...

    I have attached an example:

    http://www.ualberta.ca/~fqureshi/example.zip

    Basically this is what I want to do:

    On the right side, I have 3 columns of data. On the left, I have the area where I want to have the VLOOKUP. I want to have B6 and C6 BOTH match to something in columns H and I. So if we look in the data, matching to Rect1 & Rect2 should be 112, but if we only have the first value (like normal VLOOKUP), this doesn't work and it returns 158.

    So is there a way to have the VLOOKUP check and match BOTH values before it returns a value.

    (Sorry if my explanation is a bit confusing :P)

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Try this in cell J3 and drag down:

    Please Login or Register  to view this content.
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  3. #3
    Registered User
    Join Date
    07-12-2006
    Posts
    69
    Hmm...I get a Circular formula warning....and I think you got the data mixed up :P The "Table" that I want to check is on the right side....columns H, I and J. The column I want to have the VLOOKUP in is column D. The columns that I am editting would be B and C, and I would want it to automatically fill in the correct value in D (from H, I and J).

  4. #4
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Hi Zaraf,

    see attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-12-2006
    Posts
    69
    Wow, that is pretty complicated. But unfortunately, it's not working correctly. In column J, you have a 4, and then 1s all the way down. But if you fill it with different numbers, you'll notice that it's not looking up the correct rows that match both inputs. It seems to be functioning like a single input VLOOKUP (where only the cells in column B are compared with column H)

  6. #6
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Yes, Just noticed that after I posted the sheet. The final if statement reffers to just one vlookup.
    Apologies.

    IŽll comeback to you on this if you dont find an answer.

  7. #7
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    I was misleaded (my mistake) by your title.
    Thinking about it, what you need is a sumproduct formula:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    07-12-2006
    Posts
    69
    Oh nice that works! I never would have thought of sumproduct....didn't know you could use it like that....

    Thanks for your help!

+ 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