+ Reply to Thread
Results 1 to 2 of 2

Count sequential zeros in a column

  1. #1
    Registered User
    Join Date
    05-09-2010
    Location
    New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    3

    Unhappy Count sequential zeros in a column

    Hi everyone!

    I need help for a formula to subtotal a set of zeros in the column next to it.
    e.g. A1,A2,A3 all = 0, and A4 = 1, then in B3 will be the subtotal 3.
    Have attached an example of what I need the spreadsheet to look like.

    The formula is going into a spreadsheet that has over 8000 cells in a column, representing every 10 seconds of the day.

    Is this possible?

    Many thanks, Katie.
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Subtotaling sequential 0's in a column

    Hello Katie,

    try this in B2 and copy down

    =IF(AND(A2=0,OR(A3<>0,A3="")),COUNTIF($A$2:A2,0)-SUM($C$1:C1),"")

    cheers

+ 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