+ Reply to Thread
Results 1 to 7 of 7

Extracting certain rows based on multiple criteria

  1. #1
    Registered User
    Join Date
    10-29-2013
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Excel 2010
    Posts
    3

    Extracting certain rows based on multiple criteria

    Greetings.

    I really hope that this forum can help me out. There is no where else for me to go.
    My problem is: I have a table with over 30,000 rows and columns A - W.
    The first column A contains UNIQUE ID.
    Column G contains CATEGORY CODE.

    Example.png


    Since Unique ID (column A) can be listed more than ones, I need to select only those records (rows) that correspond to the following:
    Category Code (column G) is either 14, 15, 16, 17, 18 and not any other. I hope you can see the attachment, UNIQUE ID = a;does not satisfy my criteria as it does contain Category Code 14, it also contain other codes.
    The final result from the sample provided would be extracting data for UNIQUE ID = e (since it is the only record that does not contain any values other than 14, 15, 16, 17, 18).

    Not sure if it could be done without VBA, but, any help would be greatly appreciated.

    Thank you.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Extracting certain rows based on multiple criteria

    Place your cursor in the table. On the Ribbon, Click on Data, Filter. In column G, uncheck all boxes except those containing 14,15,16,17,18


    This should filter to show only the records you want.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-29-2013
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Extracting certain rows based on multiple criteria

    Thank you for your reply.
    Unfortunately, it is not going to solve my problem. If I filter out those records that contain the categories I do not need (based on your suggestions), I would still be left with records that contain the other values (although, they will not be visible). Such as the UNIQUE ID = b; or UNIQUE ID = d;

    What I am looking for is records that did not have any records that are not the ones I specified.
    Last edited by Nurik; 10-29-2013 at 10:44 AM.

  4. #4
    Forum Contributor
    Join Date
    09-30-2008
    Location
    London
    Posts
    124

    Re: Extracting certain rows based on multiple criteria

    See attachment
    First Filter on Column D and select Qualify, then filter on column G and select True.

    You will get desire records.

    Vinay
    Attached Files Attached Files

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Extracting certain rows based on multiple criteria

    Try this:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-30-2008
    Location
    London
    Posts
    124

    Re: Extracting certain rows based on multiple criteria

    Hi Nurik,

    Mark this post SOLVED if you got your answer!

  7. #7
    Registered User
    Join Date
    10-29-2013
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Extracting certain rows based on multiple criteria

    Thank you so very much for your help.

    I have not checked the solution, and therefore did not want to get this post updated. But, I am pretty sure that it will do the trick.

+ 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. Replies: 5
    Last Post: 12-28-2012, 02:06 PM
  2. Extracting rows based on multiple ranges and unique numbers
    By D13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2012, 09:33 AM
  3. Replies: 1
    Last Post: 05-18-2009, 11:21 AM
  4. Count Multiple Entries, Return Multiple Rows, Based On 3 Criteria
    By gtj_global in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-20-2008, 06:40 PM
  5. Extracting rows based on fixed criteria
    By EdMac in forum Excel General
    Replies: 6
    Last Post: 07-06-2006, 02:10 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