+ Reply to Thread
Results 1 to 10 of 10

Looking up and displaying data tables based on a match criteria

  1. #1
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Looking up and displaying data tables based on a match criteria

    Hi all,
    Would love some help with this INDEX/LOOKUP/MATCH displaying information issue I am struggling with.


    I have a 3x3 Display Table into which I will place formulas:

    DISPLAY
    Input cell (E1): name
    A B C
    1
    2
    3

    I have 3 x 3x3 'People' Tables
    John
    A B C
    5 XYZ
    6 YZX
    7 YYZ

    Peter
    A B C
    9 TUV
    10 UVT
    11 TTV

    Paul
    A B C
    13 MNO
    14 OON
    15 MOO


    When the name is entered into the input cell E1, I want the information from the cells in that corresponding persons table to appear in the Display Table.
    When a different name is entered the displayed data would change.

    I am happy to add some 'helper' cells in order to make this happen, I just can't get my head around the indexing that may be necessary.

    Thanks so much all.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Looking up and displaying data tables based on a match criteria

    Based on the layout that you explained in post #1, put the names in column D
    i.e. D5,D6,D7,D9,D10,D11,D13,D14,D15 = {John,John,John,Peter,Peter,Peter,Paul,Paul,Paul}

    Then in A1:
    =INDEX(A$5:A$15,SMALL(IF($D$5:$D$15=$E$1,ROW($A$5:$A$15)-(ROW($A$5)-1)),ROWS($A$1:$A1))) Ctrl Shift Enter

    Drag this formula through C1 and then down through row 3.

    Edit: The suggestion in post #3 is superior to this one. I would use that.
    Last edited by 63falcondude; 12-04-2017 at 10:14 AM. Reason: Better option available

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: Looking up and displaying data tables based on a match criteria

    Pl see file
    In D3, then drag down

    =INDEX($D$10:$D$26,MATCH($E$1,$C$8:$C$24,0)+ROWS($D$3:$D3)-1)
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Looking up and displaying data tables based on a match criteria

    Thanks for the rep. Glad that we could help.

  5. #5
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Re: Looking up and displaying data tables based on a match criteria

    This worked great =INDEX($D$10:$D$26,MATCH($E$1,$C$8:$C$24,0)+ROWS($D$3:$D3)-1)

    BUT I wonder if I can throw a curve ball at it.
    I have tried to follow similar logic, but I can't make the translation successfully.

    Book attached.

    What happens if you have a data table
    2010 2011 2012
    A B C D E F G H I
    1 2 3 3 2 1 2 3 1

    So 3 columns of data for each of the years, listed linearly.

    Input cell : YEAR
    Output table:
    3 2 1

    When you enter the year into the input box, it displays only the data from that specific year in the output table (which can then drive a graph)

    Can the same index matching process work for this scenario?

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Looking up and displaying data tables based on a match criteria

    Merged cells tend to cause issues.

    If you write out the year in each cell (I put the years in H3:P3), you can use this:

    C3 =INDEX($H$6:$P$8,MATCH($B3,$G$6:$G$8,0),INDEX(MATCH($E$1&C$2,$H$3:$P$3&$H$5:$P$5,0),0))

    Drag the formula to the right and down.

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Looking up and displaying data tables based on a match criteria

    Here's an alternative that does not require any changes to the formatting:

    =INDEX($H$6:$P$8,MATCH($B3,$G$6:$G$8,0),MATCH($E$1,$H$4:$P$4,0)+COLUMNS($A1:A1)-1)

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: Looking up and displaying data tables based on a match criteria

    IN C3, then drag across
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Re: Looking up and displaying data tables based on a match criteria

    Perfect. Astounded as ever by the communities generosity and genius' Thank you

  10. #10
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Looking up and displaying data tables based on a match criteria

    You're welcome. Glad we could help.

+ 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. [SOLVED] Self populate tables based on criteria of data in 'master' table
    By white_ross in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-12-2016, 11:07 AM
  2. [SOLVED] Grouping data from two tables (different structure) based on common criteria
    By artie note in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-07-2013, 06:13 PM
  3. [SOLVED] Displaying data based on criteria
    By mandukes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-26-2013, 02:53 AM
  4. [SOLVED] Need assistance to sum data based on multiple match criteria
    By consulttk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-01-2012, 12:11 PM
  5. Displaying data from two cells in another based on criteria
    By BridgeCat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2011, 05:17 AM
  6. Replies: 6
    Last Post: 09-29-2009, 09:23 AM
  7. Displaying data based on a criteria
    By bertman77 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-17-2008, 12:52 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