+ Reply to Thread
Results 1 to 6 of 6

Return entire range if value exists in cell

  1. #1
    Registered User
    Join Date
    07-27-2019
    Location
    Omaha, NE
    MS-Off Ver
    10
    Posts
    3

    Return entire range if value exists in cell

    Hi, first post here. I searched but couldn't find what I was looking for, so here it goes.

    I'm looking for a formula to search a specific cell for a value, and if that value exists, return the entire row. For example, in the attached screenshot, the top table is the raw data. If a 1 exists in cell B3, I want to pull the entire range (B3:Q3) from the row into a separate table.

    The bottom table is the result I'm looking for. Does this make sense?

    Table.png

    Thanks in advance!

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

    Re: Return entire range if value exists in cell

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    07-27-2019
    Location
    Omaha, NE
    MS-Off Ver
    10
    Posts
    3

    Re: Return entire range if value exists in cell

    Sample worksheet attached
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Return entire range if value exists in cell

    Put this formula in S3:

    =IF(B3=1,MAX(S$2:S2)+1,"-")

    then copy down to S14.

    Then in cell A18 you can use this formula:

    =IF(ROWS($1:1)>MAX($S:$S),"",INDEX(A:A,MATCH(ROWS($1:1),$S:$S,0)))

    Copy this across and down as required.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    07-27-2019
    Location
    Omaha, NE
    MS-Off Ver
    10
    Posts
    3

    Re: Return entire range if value exists in cell

    PETE!!! Thank You Thank You Thank You!!!!! This worked perfectly! I appreciate your help!!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Return entire range if value exists in cell

    You're welcome - glad to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. If cell exists in another tab, how to copy entire row
    By nickbsensory in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-10-2017, 10:22 AM
  2. return value based on whether value exists in cell range
    By yewhanbaker in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-16-2015, 03:54 PM
  3. Replies: 12
    Last Post: 11-08-2013, 12:37 PM
  4. If the cell contains a value that exists in a list, copy the entire row
    By fabianzetterberg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-05-2013, 03:16 PM
  5. Replies: 9
    Last Post: 07-03-2013, 07:39 AM
  6. How to Check if exists value and return cell
    By virtualdark in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-15-2011, 08:24 AM
  7. Return cell value if a sheet exists
    By NickExcel in forum Excel General
    Replies: 2
    Last Post: 08-04-2011, 01:04 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