+ Reply to Thread
Results 1 to 10 of 10

Pull whole rows of data to another sheet that match any of multiple criteria

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    Muscle Shoals, Alabama
    MS-Off Ver
    Excel 2007
    Posts
    6

    Pull whole rows of data to another sheet that match any of multiple criteria

    I have been using a method I found in this post on one of my spreadsheets for a while and it has worked great, however I now have a need to do exactly this same thing - except to pull whole rows based on one of 2 criteria. For instance, sticking with the original example sheet that was used in the other post (that I've attached here:281380-pull-rows-from-one-sheet-to-another-sheet-based-on-value-in-column-test-data-v3.xlsx) If I wanted all "Blue" tasks AND all "yellow" tasks to pull to the same sheet, how would I go about setting multiple criteria for the formula to pull all rows matching either criteria? I have played around with adding the second criteria to the next "helper" cell just below my main criteria and in the cell just to the right of my main criteria cell and trying to use the "OR" function, but I am not getting the desired results. Can anyone help me? Thanks!

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Please Login or Register  to view this content.
    the cell b1 would contain the word "yellow"

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Try


    =IFERROR(INDEX('Test Data'!A$10:A$50,SMALL(IF(('Test Data'!$A$10:$A$50=$A$1)+('Test Data'!$A$10:$A$50=$B$1),ROW('Test Data'!$A$10:$A$50)-MIN(ROW('Test Data'!$A$10:$A$50))+1),ROWS($1:1))),"")


    B1 = Yellow

  4. #4
    Registered User
    Join Date
    03-15-2013
    Location
    Muscle Shoals, Alabama
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Quote Originally Posted by rcm View Post
    Please Login or Register  to view this content.
    the cell b1 would contain the word "yellow"
    Thank you for your reply. Your formula is exactly what I had already tried - and it doesn't give me the correct result. This was my problem with this method as well. Instead of pulling the appropriate results from the list, it just pulls the first result from the list.

  5. #5
    Registered User
    Join Date
    03-15-2013
    Location
    Muscle Shoals, Alabama
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Quote Originally Posted by JohnTopley View Post
    Try


    =IFERROR(INDEX('Test Data'!A$10:A$50,SMALL(IF(('Test Data'!$A$10:$A$50=$A$1)+('Test Data'!$A$10:$A$50=$B$1),ROW('Test Data'!$A$10:$A$50)-MIN(ROW('Test Data'!$A$10:$A$50))+1),ROWS($1:1))),"")


    B1 = Yellow
    thank you for your reply as well, however with this formula, I likewise only get the first thing in the list, not the appropriate result.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Try this ARRAY formula in Deliverable Type = 24 worksheet A4 and fill across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    NOTE: Enter with Ctrl + Shift + Enter
    Last edited by newdoverman; 09-11-2015 at 06:33 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    If you want to enter the criteria in A1 and B1 try this variation:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  8. #8
    Registered User
    Join Date
    03-15-2013
    Location
    Muscle Shoals, Alabama
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Quote Originally Posted by newdoverman View Post
    If you want to enter the criteria in A1 and B1 try this variation:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    The first formula gave me no result at all, but this one did work and is working just as I had hoped! I knew to enter CTRL+SHIFT+ENTER for the array, but maybe I failed to do that when JohnTopley posted his solution, because I think his formula was the same as this one. Anyway, thank you both very much!

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Thank you for the feedback.

    Yes, JohnTopley's formula is the same. I didn't see it before posting. I don't know why the first formula with the array constants didn't work for you as it worked perfectly with your example file.


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

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Pull whole rows of data to another sheet that match any of multiple criteria

    Removed by JT
    Last edited by JohnTopley; 09-12-2015 at 03:53 AM.

+ 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. Pull data from multiple sheets to one sheet if criteria met
    By Ju1cy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-16-2014, 08:28 AM
  2. [SOLVED] Pull data from one sheet to another based on multiple criteria
    By thestalkycop in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2014, 01:38 AM
  3. Replies: 0
    Last Post: 01-13-2013, 07:06 PM
  4. Macro to pull all rows of data that match criteria into its own table in a new sheet
    By balston2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2013, 02:08 PM
  5. Replies: 4
    Last Post: 08-29-2012, 10:32 AM
  6. Pull data from one sheet to another using multiple criteria
    By Farhaad Saleh in forum Excel General
    Replies: 5
    Last Post: 07-22-2011, 10:32 AM
  7. Replies: 5
    Last Post: 01-05-2011, 03:13 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