Consulting

Results 1 to 4 of 4

Thread: Solved: VLOOKUP on multiple criteria

  1. #1
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    228
    Location

    Question Solved: VLOOKUP on multiple criteria

    Afternoon all,

    Can anyone help me with how to write the VLOOKUP formula to be based on multiple criteria;

    Example - Sheet 1, Column A contains a persons name, Column B contains an ID number, Column C contains a status

    Sheet 2 Column A contains a persons name, Column B contains an ID number

    ID numbers are not unique so for sheet 2 I would like to lookup the persons name (column A in sheet 1), if I find an exact match then see if the ID number in Column B also matches, if yes then insert sheet 1 Column C value into Column C in sheet 2

    Help please

    Marshybid

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =INDEX(Sheet1!C:C,MATCH(1,(Sheet1!A1:A200=A2)*(Sheet1!B1:B200=B2),0))

    as an array formula
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    228
    Location
    Quote Originally Posted by xld
    =INDEX(Sheet1!C:C,MATCH(1,(Sheet1!A1:A200=A2)*(Sheet1!B1:B200=B2),0))

    as an array formula
    Thanks xld, as ever your knowledge of formulas never ceases to amaze

    Marking as solved

    Marshybid

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Formulae are Excel's shining glory IMO, they underpin everything.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •