+ Reply to Thread
Results 1 to 11 of 11

Looking up a value with multiple matches in a table

  1. #1
    Registered User
    Join Date
    05-05-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Unhappy Looking up a value with multiple matches in a table

    Hi,

    I have a data table where the look up value was a name. When I would select a name (using data validation), it will show me all the related details mapped to it.

    E.g the layout is like this:

    Select Name1, I get the following details:

    Start Date --Stdt1 StDt2 StDt3
    End Date --- EDt 1 EDt2 EDt3
    Item ID---- I1 I2 I3
    Event------ E1 E2 E3

    When I select Name2, I get:

    Start Date --Stdt4 StDt5 StDt6
    End Date --- EDt4 EDt5 EDt6
    Item ID---- I4 I5 I6
    Event------ E4 E5 E6

    For this I have used the formula: -
    =IF(COLUMNS(Sheet3!$C5:C5)>$G$3,"",INDEX(Sheet6!$E2:$E163,SMALL(IF(Sheet6!$A2:$A163=Sheet3!$F$3,ROW(Sheet6!$E2:$E163)-ROW(Sheet6!$E$2)+1),COLUMNS(Sheet3!$C5:C5))))



    Now my question is, I want a different lookup value(start date this time) and a vertical layout.e.g When I select StartDate1, I should get:

    Name EndDt ItemID Event

    Nme1 EDt1 I1 E1
    Nme2 EDt2 I2 E2


    My formula doesn't work. Pls advice.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Looking up a value with multiple matches in a table

    Post a sample spreadsheet with expected results, remove any sensitive data, create a mockup example if necessary.
    Use the Go Advanced option at the bottom of the page then scroll down to Manage Attachments as the "paperclip" method does not work on this forum.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    05-05-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Looking up a value with multiple matches in a table

    Appreciate your prompt response.

    I want the present output but with a different lookup value and in a vertical layout.
    have attached the mock one.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-05-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Looking up a value with multiple matches in a table

    I think there's some mistake in the cell reference when I am using the formula for a vertical layout. Unable to catch it.

    Can someone think of a better solution. will be of great help.

  5. #5
    Registered User
    Join Date
    05-05-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Looking up a value with multiple matches in a table

    ok I got the values now just by replacing columns below: however, STILL NOT BE ABLE TO FETCH EACH AND EVERY VALUE from the table. Few at the end just return 0 or NULL.

    =IF(COLUMNS(Sheet3!$C5:C5)>$G$3,"",INDEX(Sheet6!$E2:$E163,SMALL(IF(Sheet6!$A2:$A163=Sheet3!$F$3,ROW(Sheet6!$E2:$E163)-ROW(Sheet6!$E$2)+1),COLUMNS(Sheet3!$C5:C5))))

    with rows
    =IF(COLUMNS(Sheet3!$C5:C5)>$G$3,"",INDEX(Sheet6!$E2:$E163,SMALL(IF(Sheet6!$A2:$A163=Sheet3!$F$3,ROW(Sheet6!$E2:$E163)-ROW(Sheet6!$E$2)+1),row(1:1))))

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Looking up a value with multiple matches in a table

    I believe that it would be easier to help if you would manually input the values into columns A:F on the 'Required output' sheet. That way we can attempt to write formulas/code that will replicate those values.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    05-05-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Looking up a value with multiple matches in a table

    Any thoughts!!!

  8. #8
    Registered User
    Join Date
    05-05-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Looking up a value with multiple matches in a table

    Sorry. I did not quite get that. THe required output sheet contains the formulae to fetch the data from the data sheet. That's where I am going wrong.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Looking up a value with multiple matches in a table

    It would help us to see what should go in the cells, not just the #Ref errors that are there now. Please manually type the expected results into each of the cells in the range A6:F7, on the required output sheet, so that we can try to modify the formulas that you have written (or write new formulas) so that they will yield the same results as the ones you type.

  10. #10
    Registered User
    Join Date
    05-05-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Looking up a value with multiple matches in a table

    My bad!1 Please check if this helps.
    Attached Files Attached Files

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Looking up a value with multiple matches in a table

    Select A6 on the required output sheet and paste the following into the formula bar:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    After activating by simultaneously pressing the Ctrl, Shift and Enter keys you can copy across and down.
    Let us know if you have any questions.

+ 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] Formula to Return Multiple matches from a table
    By meabrams in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-18-2017, 04:52 AM
  2. Extract data from table into new table that matches multiple criteria
    By joplrw10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-25-2016, 12:30 PM
  3. Match-Up two tables where one table has multiple possible matches
    By kevsvette in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-09-2016, 02:28 PM
  4. [SOLVED] Return Multiple Matches into Corresponding Table
    By QuantumP in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2016, 04:37 AM
  5. [SOLVED] Populate a table from a list that has multiple matches
    By bbatterman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2014, 01:48 PM
  6. Finding Max in Lookup Table with Multiple Matches
    By Rozay in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2013, 06:11 PM
  7. Multiple Matches Worksheet to Pivot Table
    By jaslake in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-09-2009, 09:28 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