+ Reply to Thread
Results 1 to 9 of 9

count group of Consecutive cells according to cretiria

  1. #1
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    count group of Consecutive cells according to cretiria

    Hi,

    Pls refer to the attached WB for a complete and detailed question.

    Thanks, Elm
    Attached Files Attached Files
    Last edited by ElmerS; 04-08-2009 at 12:05 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count group of Consecutive cells according to cretiria

    Try:

    Please Login or Register  to view this content.

    confirmed with CTRL+SHIFT+ENTER
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: count group of Consecutive cells according to cretiria

    Here's one way:

    With
    B1:B100 contains numbers, blanks allowed
    E4: (min group size....eg 3)
    E5: (Floor amount.....eg 10)

    This ARRAY FORMULA, committed with CTRL+SHIFT+ENTER
    (instead of just ENTER), returns the count of groups of
    consecutive values in col_B where:
    • the amount is greater than E5
    • the group count is equal to or greater than E4

    Please Login or Register  to view this content.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    Re: count group of Consecutive cells according to cretiria

    Thanks, NBVC,

    It looks fine and close but to my opinion, not good enough.

    Try to reduce the value of B13 or B14 or B15, to 9.9 which should change the result to 2 but, unfortunately, it remains 3.

    ================================
    Thanks, Ron,

    Your formula looks much more promising.

    I will check it out this afternoon on several combinations.

    Elm
    Last edited by ElmerS; 04-08-2009 at 08:53 AM.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count group of Consecutive cells according to cretiria

    Sorry... slight formula adjustment..

    Please Login or Register  to view this content.
    confirmed with CSE keys

    Edit: Just noticed Ron's solution... similar to my adjusted formula... the only difference is whether you want > or >= E5 and/or E4 in the formulas...
    Last edited by NBVC; 04-08-2009 at 08:57 AM.

  6. #6
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    Re: count group of Consecutive cells according to cretiria

    Thank you both.

    As far as I could check the various combinations - it works like charm.

    Elm

  7. #7
    Registered User
    Join Date
    11-26-2009
    Location
    london, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: count group of Consecutive cells according to cretiria

    Hi all,

    I'm new here and I found this forum very useful and powerful!

    I'm using the formula NBVC suggested, it's great! Thanks!

    I would also like to know if it was possible to find a way to highlight the consecutive cells which match the criteria, not "only" count them (the cell highlighted in green in ElmeRs' excel book).

    Thank you!

    I know that it is extremely difficult

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count group of Consecutive cells according to cretiria

    zebinza, welcome to the forum,

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  9. #9
    Registered User
    Join Date
    11-26-2009
    Location
    london, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: count group of Consecutive cells according to cretiria

    Thank you NBVC (and sorry..),

    I'll do that right now..

+ 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