Results 1 to 7 of 7

Thread: Count consecutive value in a range using formula

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    You mean the maximum continuous occurrence of a given value? Or should the character that is repeating the most continuously should be displayed along with the maximum number?
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  2. #2
    Senior Member LalitPandey87's Avatar
    Join Date
    Sep 2011
    Posts
    222
    Rep Power
    15
    Quote Originally Posted by Excel Fox View Post
    You mean the maximum continuous occurrence of a given value? Or should the character that is repeating the most continuously should be displayed along with the maximum number?

    Yes i mean the maximum continuous occurrence of a value based on criteria.

    For Ex. :-

    A A B A A A A B B C

    In above data range
    if the criteria is "A" then the answer will be 4
    if the criteria is "B" then the answer will be 2
    if the criteria is "C" then the answer will be 1
    Last edited by LalitPandey87; 04-27-2012 at 08:13 AM.

  3. #3
    Senior Member LalitPandey87's Avatar
    Join Date
    Sep 2011
    Posts
    222
    Rep Power
    15
    Quote Originally Posted by Admin View Post
    Hi

    Try this array formula

    =MAX(FREQUENCY(IF(A1:H1=J1,COLUMN(A1:H1)),IF(A1:H1 <>J1,COLUMN(A1:H1))))

    Where J1 houses A

    HTH
    Thanks Admin for your quick response.


    This is exactly what i was lookin for.
    Last edited by LalitPandey87; 04-27-2012 at 08:47 AM.

Similar Threads

  1. Count Colored Cells Using Excel Formula
    By mahmoud-lee in forum Excel Help
    Replies: 4
    Last Post: 06-15-2013, 11:37 AM
  2. Replies: 1
    Last Post: 12-04-2012, 05:30 PM
  3. counting consecutive values in an array
    By 5ko in forum Excel Help
    Replies: 3
    Last Post: 12-04-2012, 03:49 AM
  4. Replies: 3
    Last Post: 04-08-2012, 09:44 AM
  5. Unique Count on a Filtered Range
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 08-14-2011, 04:29 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •