+ Reply to Thread
Results 1 to 10 of 10

Filtering

  1. #1
    Registered User
    Join Date
    10-29-2010
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    14

    Filtering

    I would be so happy if you could help me with filtering.

    I have starting at A1 to N250 data, all numeric containing 6 numbers (i.e. 1,2,3,4,5,6 - 25,96,113,78,5914,27) and with these I wish to filter them as follows:
    any with 4,5 or 6 odd or even numbers
    any with more than two consecutive numbers
    any with more than two within a range of 10

    Thank you in advance for your help.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help with Excel filtering

    Should that read A250? Excel likes when you have 1 data point (you have 6) in each cell. I think this will require a VBA solution (or a lot of helper columns).
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-29-2010
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Help with Excel filtering

    Quote Originally Posted by ChemistB View Post
    Should that read A250? Excel likes when you have 1 data point (you have 6) in each cell. I think this will require a VBA solution (or a lot of helper columns).
    I have 250 rows in each column A - M and yes each has a set of six digits separated by a ,

    Am I correct in thinking you say it would be better to do say 13 sheets and split each entry into one number per cell? so they would be a-f in each of the 250 rows on all 13 sheets if so is there an easy way to change the data into that way than manually re entering it?
    Last edited by Blakespops; 10-29-2010 at 02:58 PM.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help with Excel filtering

    Here's an example of finding >3 odd, >3 Even and more than 2 consecutive #'s. Can you clarify on your last criteria?

    Copy each column to a fresh sheet and then do "Text to Columns">Delimited>check off comma and ENTER. That moves them to their own cells.

    Formula's in attached sheet
    >3 Odd =SUMPRODUCT(--(MOD($A2:$F2,2)=1))>3
    >3 Even =SUMPRODUCT(--(MOD($A2:$F2,2)=0))>3
    >2 Conseq =SUMPRODUCT(--(B2:E2-A2:D2=1),--(C2:F2-B2:E2=1))>0

    PS. I won't be around till monday so maybe someone else can help you.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-29-2010
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Help with Excel filtering

    Quote Originally Posted by ChemistB View Post
    Here's an example of finding >3 odd, >3 Even and more than 2 consecutive #'s. Can you clarify on your last criteria?

    Copy each column to a fresh sheet and then do "Text to Columns">Delimited>check off comma and ENTER. That moves them to their own cells.

    Formula's in attached sheet
    >3 Odd =SUMPRODUCT(--(MOD($A2:$F2,2)=1))>3
    >3 Even =SUMPRODUCT(--(MOD($A2:$F2,2)=0))>3
    >2 Conseq =SUMPRODUCT(--(B2:E2-A2:D2=1),--(C2:F2-B2:E2=1))>0

    PS. I won't be around till monday so maybe someone else can help you.
    the last one is no more than two in any 10 i.e. 1,2,13,14,,24,26.

  6. #6
    Registered User
    Join Date
    10-29-2010
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Help with Excel filtering

    Quote Originally Posted by Blakespops View Post
    the last one is no more than two in any 10 i.e. 1,2,13,14,,24,26.
    Am still looking to be able to filter out this section of numbers if anyone can help please.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Filtering

    post a workbook with samples and expected results
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Filtering

    ChemistB < Admittedly stumped. (but working on it)
    Based on your first post;
    1. numbers can range from 1 into the thousands
    2. they may or may not be in order
    True?

  9. #9
    Registered User
    Join Date
    10-29-2010
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Filtering

    I have worked out a way to reduce any range to just 75. and the numbers can be arranged in such a way that they are low to hi. if that helps.

    just a quick note, 2 Conseq =SUMPRODUCT(--(B2:E2-A2:D2=1),--(C2:F2-B2:E2=1))>0 returns 22 24 31 39 48 49 as true. among others. other two are perfect though.

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Filtering

    where is the example i asked for?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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