+ Reply to Thread
Results 1 to 9 of 9

Search one column, Retieve multiple rows of data

  1. #1
    Registered User
    Join Date
    09-02-2014
    Location
    Virginia
    MS-Off Ver
    2016
    Posts
    6

    Search one column, Retieve multiple rows of data

    Good morning all,

    I have a wiring diagram that I am breaking down into a spreadsheet for locating manufacturer part numbers for individual component. My spreadsheet is laid out with wiring harness number on the left. Second column is connector number third column pin number etc. I would like to be able to search a harness number and return al rows associated with that harness. I would like to extend that further by being able to search a connector number and return all rows associated with that number. all of the harnesses have different number of components and connectors can vary from 4 rows to 12 rows. I feel like grouping may help me here but, I have never used grouping and all of the videos that I have found are simply how to group not how to search for a group. I have included a sample of my spreadsheet. Thank You for any help and the opportunity to learn something new

    Sample Pic.PNG

    Greg
    A10ECGent
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Search one column, Retieve multiple rows of data

    Are you still using Excel 2007?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-02-2014
    Location
    Virginia
    MS-Off Ver
    2016
    Posts
    6

    Re: Search one column, Retieve multiple rows of data

    No, Professional Plus 2016. I forgot to update that in my profile. thanks for catching it.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Search one column, Retieve multiple rows of data

    Thanks.

    Please manually mock up some expected results in the sample workbook.

  5. #5
    Registered User
    Join Date
    09-02-2014
    Location
    Virginia
    MS-Off Ver
    2016
    Posts
    6

    Re: Search one column, Retieve multiple rows of data

    I merged some cells in this pic to show the relationships

    Sample Pic3.PNG

    If I search by harness i Would like to pull all blocks related to that harness number, not just the lines with the harness number.

    Sample Pic1.PNG

    Same for Connector number. If I search by connector i Would like to pull all blocks related to that connector number, not just the lines with the connector number.

    Sample Pic2.PNG
    Attached Images Attached Images

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

    Re: Search one column, Retieve multiple rows of data

    Perhaps this will help.
    1. Add a column (N) to sheet1 populated using: =IF(Sheet2!A$2<>"",IF(A2<>"",A2,N1),IF(B3<>"",B3,N1))
    2. Populate cells B2:G35 on sheet2 using: =IFERROR(INDEX(Sheet1!B$2:B$81,AGGREGATE(15,6,(ROW(Sheet1!C$2:C$81)-ROW(Sheet1!C$1))/(Sheet1!$N$2:$N$81=$A$2),ROWS(B$2:B2))),"")
    3. Populate cells J2:J35 and L2:P25 using: =IFERROR(INDEX(Sheet1!A$2:A$81,AGGREGATE(15,6,(ROW(Sheet1!A$2:A$81)-ROW(Sheet1!A$1))/(Sheet1!$N$2:$N$81=$K$3),ROWS(J$2:J2))),"")
    Note that if you want to lookup records by harness put the harness number in cell A2 on Sheet2.
    If you want to look up records by connector put the connector number in cell K3 on sheet2.
    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
    09-02-2014
    Location
    Virginia
    MS-Off Ver
    2016
    Posts
    6

    Re: Search one column, Retieve multiple rows of data

    Thank You. That helped achieve what I was trying to do

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Search one column, Retieve multiple rows of data

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

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

    Re: Search one column, Retieve multiple rows of data

    You're Welcome and thank you for the feedback. As Ali requests, please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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] Conditional formatting using multiple sheets and search function in multiple rows & column
    By Unlimited007 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2020, 01:28 PM
  2. [SOLVED] search multiple text in column to clear rows
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-20-2015, 12:31 PM
  3. [SOLVED] Search multiple rows for cell color, return date from same column
    By OceanAngel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2014, 10:07 AM
  4. Replies: 3
    Last Post: 03-31-2014, 01:00 PM
  5. Search data to see if any rows match multiple criteria
    By lafountain2209 in forum Excel General
    Replies: 1
    Last Post: 03-21-2013, 01:52 PM
  6. Multiple search of terms in one column to create data in another column
    By verdemedia in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-10-2012, 10:47 PM
  7. Retieve data ignoring blank entries
    By swanseaexcel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-20-2011, 04:46 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