+ Reply to Thread
Results 1 to 2 of 2

Search an array with an array and return matching value

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    107

    Search an array with an array and return matching value

    Hi,

    I'm stuck on how to get search one array with another array and get the matching result of the two arrays:

    Array 1, A1:C1;
    Bob
    Bill
    Ben

    Array 2, E1:E3;
    Luke
    Ben
    Han

    In D1 I should have the result: Ben

    Any help would be greatly appreciated.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Search an array with an array and return matching value

    Try this...


    Data Range
    A
    B
    C
    D
    E
    1
    Bob
    Bill
    Ben
    Ben
    Luke
    2
    Ben
    3
    Han
    4


    This array formula** entered in D1:

    =INDEX(E:E,SMALL(IF(A1:C1=E1:E3,ROW(E1:E3)),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 12-23-2013, 08:43 AM
  2. [SOLVED] Return matching string in array if cell contains string contained in the array
    By AaronsZ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-03-2013, 01:55 PM
  3. Replies: 0
    Last Post: 08-23-2012, 01:43 PM
  4. [SOLVED] Search array and return rows?
    By marrott2 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-25-2011, 02:11 AM
  5. Search array and return element No
    By Ron in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-17-2006, 12:35 AM

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