+ Reply to Thread
Results 1 to 6 of 6

Search for a value in a row, return list of cells below that particular cell

  1. #1
    Registered User
    Join Date
    08-20-2019
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    9

    Search for a value in a row, return list of cells below that particular cell

    Hi, can someone help me please?

    excel1.PNG

    I want to be able to search for a particular value in row E7:H7 and have it return the cells below as indicated on the picture attached.

    HOWEVER, if I search for "B" I don't get 2,6,wait,14,18 returned because I don't know how to extend the look up value.

    This is the formula I am using: =INDEX(E7:H12,MATCH($J$8,$E$7:$E$12,0)+{1,2,3,4,5},1)

    Can anyone help me adjust this formula so that I can change the search value to B or C and get the following list of cells below them?


    (Hope I am making myself clear enough)
    Attached Files Attached Files
    Last edited by fendersony; 08-20-2019 at 04:49 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,442

    Re: Search for a value in a row, return list of cells below that particular cell

    Select K8:K12
    Enter =INDEX($E$7:$H$12,,MATCH($J$8,$E$7:$H$7,0)) in the formula bar
    Then commit with Ctrl+Shift+Enter (array formula) - Results appear in the selected range
    Once this is done change J8 as needed
    Last edited by Pepe Le Mokko; 08-20-2019 at 06:10 AM.

  3. #3
    Registered User
    Join Date
    08-20-2019
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    9

    Re: Search for a value in a row, return list of cells below that particular cell

    Doesn't work

    Attachment 637937

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,359

    Re: Search for a value in a row, return list of cells below that particular cell

    Maybe put this on blank cells then ENTERED as array formula, press all together CTRL+SHIFT+ENTER button then copied down as necessary:

    =IFERROR(INDEX($E$8:$H$12,SMALL(IF((INDEX($E$8:$H$12,0,MATCH($J$8,$E$7:$H$7,0))<>""),MATCH(ROW($A$8:$A$12),ROW($A$8:$A$12)),""),ROW(A1)),MATCH($J$8,$E$7:$H$7,0)),"")
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-20-2019
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    9

    Re: Search for a value in a row, return list of cells below that particular cell

    Quote Originally Posted by azumi View Post
    Maybe put this on blank cells then ENTERED as array formula, press all together CTRL+SHIFT+ENTER button then copied down as necessary:

    =IFERROR(INDEX($E$8:$H$12,SMALL(IF((INDEX($E$8:$H$12,0,MATCH($J$8,$E$7:$H$7,0))<>""),MATCH(ROW($A$8:$A$12),ROW($A$8:$A$12)),""),ROW(A1)),MATCH($J$8,$E$7:$H$7,0)),"")
    Thanks so much! it worked.

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,442

    Re: Search for a value in a row, return list of cells below that particular cell

    Quote Originally Posted by fendersony View Post
    Doesn't work

    Attachment 637937
    Please explain what "doesn't work" means.
    • Does the code run?
    • Does it run but do nothing?
    • Does it produce error messages? If so, what do the messages say?
    • Does it produce unexpected/wrong results? If so, how do the results differ from what you expect?
    • Does it hang?

    It works perfectly if you follow the instructions

+ 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. Return search item/s from array or list in a cell (exact match)
    By adm.patrikbpl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-16-2017, 09:22 AM
  2. [SOLVED] Search range of cells, return cell locations of all cells of particular colour
    By AJB611 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2017, 11:50 AM
  3. [SOLVED] Search list for cell value, return or highlight cells that contain value
    By dusty90 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-16-2016, 09:40 PM
  4. Replies: 2
    Last Post: 09-12-2015, 11:02 AM
  5. Search value, return list of cells
    By matuella in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2015, 09:19 PM
  6. [SOLVED] Search for a word within a list of names and return the entire name within the cell.
    By staljunk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-02-2015, 04:50 PM
  7. [SOLVED] Formula to search from keyword list and return adjacent cell
    By Ninja2k in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-31-2013, 08:44 AM

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