+ Reply to Thread
Results 1 to 4 of 4

How to use match function to lookup more than one possible value

  1. #1
    Forum Contributor
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365 2209
    Posts
    180

    How to use match function to lookup more than one possible value

    Hi all,

    I have a set of data where I want to know the match of more than one value, specifically. To give an example lets say I have this

    1 10
    2 12
    5 13
    6 19
    7 17
    1 11
    2 15
    6 3


    And I want to use index along with match to return the values that have 1,2 in front of them...which would be 10,12, 11, 15...match seems to only allow me to put in 1 value at a time, so how do I get around this?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,799

    Re: How to use match function to lookup more than one possible value

    Look at this link

    http://eimagine.com/how-to-return-mu...ch-or-vlookup/
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,185

    Re: How to use match function to lookup more than one possible value

    Try this ...

    =IFERROR(INDEX(B:B,SMALL(IF(($A$1:$A$8=$D$2)+($A$1:$A$8=$E$2),ROW($A$1:$A$8),""),ROWS($D$4:D4))),"")

    Enter with Ctrl+Shift+Enter.
    Attached Files Attached Files

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

    Re: How to use match function to lookup more than one possible value

    Try this...

    Data Range
    A
    B
    C
    D
    E
    1
    ------
    ------
    ------
    ------
    ------
    2
    1
    10
    1
    10
    3
    2
    12
    2
    12
    4
    5
    13
    11
    5
    6
    19
    15
    6
    7
    17
    7
    1
    11
    8
    2
    15
    9
    6
    3
    10


    This array formula** entered in E2:

    =IFERROR(INDEX(B:B,SMALL(IF(ISNUMBER(MATCH(A$2:A$9,D$2:D$3,0)),ROW(A$2:A$9)),ROWS(E$2:E2))),"")

    ** 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.

    Copy down until you get blanks.
    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. MATCH or LOOKUP FUNCTION
    By MW_Beckie in forum Excel General
    Replies: 8
    Last Post: 02-15-2016, 08:24 PM
  2. Replies: 3
    Last Post: 06-17-2013, 12:37 PM
  3. Lookup or Match function?
    By elfiky in forum Excel General
    Replies: 2
    Last Post: 09-08-2010, 02:02 PM
  4. Help with LOOKUP / MATCH Function
    By carlosbourn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-05-2009, 10:50 AM
  5. match/lookup function
    By WHWALDREP in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-28-2008, 06:15 PM
  6. Lookup/match function
    By spgprivate in forum Excel General
    Replies: 1
    Last Post: 07-13-2006, 06:00 AM
  7. Lookup Function and Match
    By galv2 in forum Excel General
    Replies: 2
    Last Post: 12-24-2005, 03:10 PM

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