+ Reply to Thread
Results 1 to 6 of 6

Return rows based on column value

  1. #1
    Registered User
    Join Date
    03-05-2019
    Location
    Minneapolis, MN
    MS-Off Ver
    MS Office 2010
    Posts
    25

    Return rows based on column value

    HI Friends! I am looking for a simple formula that will pull all the information from a row based on the cell value in one of the columns. See the attached file for reference. I would like to return all the information from the sheet "Showroom Floor" into the sheet "Results". Essentially, if i select an option from the list (Cell D3 in sheet "Results") all of the rows and their information from sheet "Showroom Floor" will appear in the appropriate columns of sheet "Results". To further explain, if "Cabinetry" was selected in D3 of sheet "Results" then the chart below that cell would return the information of from rows 6, 8, 13, 27 of sheet "Showroom Floor". I think it has to do with the Index formula but i can't seem to figure it out. Any help, thank you!
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Return rows based on column value

    Hi,

    Personally I'd use a Pivot Table and a Slicer to select the Item. See attached.

    Otherwise I'd use the standard Data Filtering functionality to extract the relevbant records to your Results sheet.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: Return rows based on column value

    The simplest way is with a helper column in Showroom Floor sheet. This column can be hidden after you create the formula if you wish. In M3 copied down
    =IF(B3<>"",B3&"-"&COUNTIF($B$3:$B3,B3),"")

    Then in Results in D6 copied down and across
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Is that what you are looking for?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: Return rows based on column value

    I reverse my decision and agree with Richard, the simplest way is with a pivot table.

  5. #5
    Registered User
    Join Date
    03-05-2019
    Location
    Minneapolis, MN
    MS-Off Ver
    MS Office 2010
    Posts
    25

    Re: Return rows based on column value

    Thanks ChemistB! I believe this is exactly what I was looking for. Is there a way to change the formula slightly to give any empty cells a "-" instead of a "0" or "N/A"? The formula already accounts for the "N/A" I believe with "Iferror".

    To take this formula further and more in depth, is it possible to select from two columns? Such as, can the list in cell D3 on "Results" contain values from columns "Items" & "Brand" from sheet "Showroom Floor" resulting in the same output?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Return rows based on column value

    Perhaps a more fundamental question is can there be more than one "Item" for any one "Brand"?

    The sample data supplied indicates not.

    You could however just add a Brand Slicer to the aforementioned Pivot Table, (or indeed a Slicer for any of the fields) and obtain the same results using the Brand Slicer.

+ 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 the highest number in a column based on a matching second column
    By kersplash in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-29-2019, 02:41 AM
  2. Replies: 5
    Last Post: 02-14-2019, 02:20 PM
  3. Replies: 2
    Last Post: 05-07-2015, 04:38 PM
  4. Replies: 19
    Last Post: 04-17-2013, 09:51 PM
  5. [SOLVED] Return the lowest value in one column based on a text search in a different column.
    By Juliana33 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-11-2012, 09:58 AM
  6. [SOLVED] return multiple results from one column based on cells in another column
    By chollyfunk in forum Excel General
    Replies: 5
    Last Post: 05-09-2012, 05:20 AM
  7. Replies: 1
    Last Post: 01-05-2011, 05:18 PM

Tags for this Thread

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