+ Reply to Thread
Results 1 to 5 of 5

Displaying Row by Criteria

  1. #1
    Registered User
    Join Date
    08-17-2008
    Location
    LA
    Posts
    22

    Displaying Row by Criteria

    Hello All,

    Hopefully you could assist me in solving an issue I've been having all morning!

    I have a data set on Sheet 1 as follows:

    Yes Bob 2 1992
    Yes Rick 6 1992
    Yes Steve 5 1998
    No Bob 2 1992
    Yes Steve 5 1992

    What I want is on Sheet 2, to display this:

    Yes Bob 2 1992
    Yes Rick 6 1992
    Yes Steve 5 1998
    Yes Steve 5 1992

    With no empty rows. The criteria is if column A = "Yes", then the whole row should pull in. I need a function/formula that works on Sheet 2, so when Sheet 1 data is changed, Sheet 2 automatically pulls in the Yes criteria. Any ideas? I tried a VLOOKUP and it only pulled in the first row, nothing else.
    Last edited by jdot; 10-02-2013 at 03:37 PM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Displaying Row by Criteria

    With your data starting from Row 2 use

    =IF(ROWS(A$1:A1)>COUNTIF($A$2:$A$100,"Yes"),"",INDEX(B$2:B$100,SMALL(INDEX(($A$2:$A$100="Yes")*(ROW($B$2:$B$100)-ROW($B$2)+1),),COUNTIF($A$2:$A$100,"<>"&"Yes")+ROWS(A$1:A1))))

    Copy down and across
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    08-17-2008
    Location
    LA
    Posts
    22

    Re: Displaying Row by Criteria

    Thanks! I had an issue with the formula running across though. Instead of pulling in:

    Yes Bob 2 1992
    Yes Rick 6 1992
    Yes Steve 5 1998
    Yes Steve 5 1992

    My spreadsheet pulled in

    Yes Yes Yes Yes
    Yes Yes Yes Yes
    Yes Yes Yes Yes
    Yes Yes Yes Yes

    The number of rows are correct, but the values are incorrect.

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Displaying Row by Criteria

    You must have absolute referenced column B.

    See formula in action (highlighted in yellow)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-17-2008
    Location
    LA
    Posts
    22

    Re: Displaying Row by Criteria

    Worked like a charm! Thank you!!!

+ 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. Looking up results of a certain criteria and displaying them all into one row
    By zatan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2013, 07:59 AM
  2. Displaying Multiple Criteria from Autofilter
    By Sinclair in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-09-2011, 06:10 AM
  3. Displaying data based on a criteria
    By bertman77 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-17-2008, 12:52 PM
  4. Displaying AutoFilter criteria
    By lehainam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2005, 06:05 PM
  5. Displaying autofilter criteria
    By [email protected] in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-25-2005, 06:06 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