+ Reply to Thread
Results 1 to 5 of 5

INDEX and MATCH - Multiple lookup?

  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    INDEX and MATCH - Multiple lookup?

    Hi, not sure how to explain this but here goes...

    I would like to bring in some data from another workbook if 2 conditions are met:

    1. The Date
    2. The User ID

    Is it possible to do this with INDEX and MATCH? I tried doing it like this if it helps explain a bit better:

    Sheet 1. Column C:
    =INDEX(Sheet2!C:C,MATCH(Sheet1!A2&Sheet1!B2,Sheet2!A:A&Sheet2!B:B,0))

    Sheet 1
    A: Date
    B: User ID
    C: Comments (Where above formula is)

    Sheet 2
    A: Date
    B: User ID
    C: Comments

    Kind regards
    Tom

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: INDEX and MATCH - Multiple lookup?

    =INDEX(Sheet2!C1:C100,MATCH(A1&B1,INDEX(Sheet2!A1:A100&Sheet2!B1:B100,0),0))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: INDEX and MATCH - Multiple lookup?

    Hi tom,

    the easieset would probably be to introduce a new column C in your Sheet2 with a formula like

    =A1&B1

    copied down.

    Then on Sheet1 you can use

    =if(isna(match(A1&B1,Sheet2!$C$1:$C$100,0)),"",vlookup(A1&B1,Sheet2!$C$1:$D$100,2,false))

    hth

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: INDEX and MATCH - Multiple lookup?

    nice one, Martin!

  5. #5
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: INDEX and MATCH - Multiple lookup?

    Awsome 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