+ Reply to Thread
Results 1 to 8 of 8

Vlookup using 2 criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    10-16-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Vlookup using 2 criteria

    That's what it was, it works now in my sample! Now I'm trying to integrate it into my actual file and adjusting the references, but I can't figure out what the "1" means as the first argument for MATCH. I'm setting it up identical (or so I thought) to the sample and I'm getting a "#NUM" error.

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

    Re: Vlookup using 2 criteria

    The 1 is the lookup value here...

    the two conditions, ($A$2:$A$10=A11) and ($B$2:$B$10=B11) create an array of TRUEs and FALSEs depending on if the separate matches are found...

    multiplying the 2 together, like so, ($A$2:$A$10=A11)*($B$2:$B$10=B11),

    will coerce the TRUEs/FALSEs to 1s and 0s, respectively... and at the point where both arrays have a 1, is the point where a match of the 2 criteria is found in the same row... the internal INDEX() functions, re-creates the array for the Match() function to look up against... so Match(1,....) looks for the postion of that 1 where both criteria are met together .. and returns the position number which is then indexed on the outside INDEX() array...

    so, you shouldn't get #NUM error if you entered the ranges and reference correctly. At most you would get #N/A if a match is not found.
    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