+ Reply to Thread
Results 1 to 7 of 7

How to count the amount of times there are 7 consecutive 1s or 0s in cells down a column

  1. #1
    Registered User
    Join Date
    10-14-2020
    Location
    New York
    MS-Off Ver
    Free Online google sheets version
    Posts
    5

    How to count the amount of times there are 7 consecutive 1s or 0s in cells down a column

    I have a very long column of zeros and ones. I need to use excel to tell me how many #1's in a group of 7 cells in a row. Is there any function I can use to have this calculated?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to count the amount of times there are 7 consecutive 1s or 0s in cells down a colu

    Is this a Google Sheets query?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-14-2020
    Location
    New York
    MS-Off Ver
    Free Online google sheets version
    Posts
    5

    Re: How to count the amount of times there are 7 consecutive 1s or 0s in cells down a colu

    UPDATE: RAN INTO ANOTHER PROBLEM ACTUALLY: SEE MY REPLY BELOW




    No it's actually for Office Libre, but it has all of the functionality as the Full Excel. And now I magically came across how to count duplicates
    I think this works for me actually
    Last edited by Salmonbushes; 12-30-2020 at 09:24 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to count the amount of times there are 7 consecutive 1s or 0s in cells down a colu

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Registered User
    Join Date
    10-14-2020
    Location
    New York
    MS-Off Ver
    Free Online google sheets version
    Posts
    5

    Re: How to count the amount of times there are 7 consecutive 1s or 0s in cells down a colu

    Actually, just ran into something else about this. Basically I need to add an exception to the formula which is =IF(I2=I1,J1+1,1) so that this formula won't run for each cell in column "I" having the value of 0. Do you know what I would add to this formula to achieve that?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to count the amount of times there are 7 consecutive 1s or 0s in cells down a colu

    Do you mean this?

    =IF(I2=0,"",IF(I2=I1,J1+1,1))

  7. #7
    Registered User
    Join Date
    10-14-2020
    Location
    New York
    MS-Off Ver
    Free Online google sheets version
    Posts
    5

    Re: How to count the amount of times there are 7 consecutive 1s or 0s in cells down a colu

    YES! That's perfect Thanks! I'll mark this thread as "solved"

+ 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. Count the Consecutive Times a Value Has Occurred
    By e4excel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-22-2020, 11:04 AM
  2. Replies: 26
    Last Post: 08-07-2017, 02:46 PM
  3. Count the amount of consecutive dates
    By zuprex in forum Excel General
    Replies: 2
    Last Post: 02-09-2017, 01:39 PM
  4. Count number of consecutive non blank cells in a column macro excel
    By nasim12w in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-03-2015, 06:00 AM
  5. Detecting X amount of consecutive figures in a column
    By SFinch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-27-2015, 05:26 AM
  6. Count the number of consecutive times a value occurs
    By mbhc77 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2014, 07:58 AM
  7. Replies: 2
    Last Post: 12-09-2009, 06:36 AM

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