+ Reply to Thread
Results 1 to 3 of 3

Advanced filter for several criteria

  1. #1
    Registered User
    Join Date
    11-08-2014
    Location
    Pretoria
    MS-Off Ver
    2013
    Posts
    2

    Advanced filter for several criteria

    I need help with either an advanced filter or expression in Excel (2013) (... or if anyone knows SAS Enterpire Guide 4.3)

    I have a dataset with different breeds, father's country of origin and birth dates for pigs. I need to compare offspring born on the same date, for each breed, but entries must be limited to dates that include one international country and the birth country.

    So for example.. If country B and C are international countries, for all born in January 2010, if breed 1 only has offspring from country A and breed 2 has offspring from both country A and C, only breed 2's entries will be shown for both countries. Also, there must always be one entry from country A.

    So if the entries are:


    Date Breed Country
    Jan 2010 1 A
    Jan 2010 1 A
    Jan 2010 2 A
    Jan 2010 2 C
    Feb 2013 1 B
    Feb 2013 1 B

    I only want to only see

    Date Breed Country
    Jan 2010 2 A
    Jan 2010 2 C

    Any help will be greatly appreciated!!

    Also.. the data set contains about 11000 entries so manually removing entries is the very last option I don't wish to entertain!
    Last edited by TheBuginator; 11-08-2014 at 05:49 AM.

  2. #2
    Registered User
    Join Date
    11-08-2014
    Location
    Pretoria
    MS-Off Ver
    2013
    Posts
    2

    Re: Advanced filter for several criteria

    ... bump

    there must be someone who has a potential solution???

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Advanced filter for several criteria

    I just couldn't see a way through this one. No doubt some of the Gurus will be able to see through the problem and provide an elegant solution. This one, I'm afraid, is based on brute force and ignorance.

    Column D - a helper column - a breed/month combination.
    Columns E to L extract (horizontally) all countries associated with the breed/month combination
    Column M checks that the home country (I am assuming that it's S. Africa) is returned by columns E to L and checks that there is at least one other country returned for each breed-month combination and returns either Keep or Discard. Filter and discard the discards...

    Brute force, but it seems to work. Over to others to come up with an elegant solution...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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. [SOLVED] Advanced Filter Code : Criteria Range More Than 1 Row Breaks Filter
    By PaulGW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2021, 04:30 PM
  2. Advanced Filter : One Criteria Cell Breaks the Filter - Returns Only Headers
    By PaulGW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2014, 10:06 AM
  3. Advanced filter with 2 criteria
    By philozelda in forum Excel General
    Replies: 1
    Last Post: 02-26-2014, 05:54 PM
  4. Advanced Filter Criteria
    By ions in forum Excel General
    Replies: 2
    Last Post: 10-10-2006, 09:50 AM
  5. [SOLVED] Help req with advanced filter criteria
    By Jimbo in forum Excel General
    Replies: 5
    Last Post: 01-28-2005, 09: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