+ Reply to Thread
Results 1 to 2 of 2

Count that restarts counting if a condition is met

Hybrid View

  1. #1
    Registered User
    Join Date
    08-08-2017
    Location
    Chicago, IL
    MS-Off Ver
    Google Sheets
    Posts
    1

    Lightbulb Count that restarts counting if a condition is met

    Hi!

    I'm trying to keep a cumulative count of when "1" occurs, but then having it restart whenever "0" occurs. The count should be unaffected by blank cells. Here is an example of what it should look like:

    Screen Shot 2017-08-09 at 2.59.31 PM.png


    Any thoughts on this? I've been stumped for quite some time and not sure if this is something that will require a script. I am also using Google Sheets and need to be using it for my purposes.

    Any help would be much appreciated.

    Thanks!
    Last edited by pedro93; 08-09-2017 at 04:00 PM.

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Count that restarts counting if a condition is met

    Hi pedro93, welcome to the forum. Paste this in B2 and copy down:
    =IF(A2=1,N(B1)+1,IF(A2="",N(B1),0))

    Please click the Add Reputation star below any helpful posts, and use Thread Tools (up top) to mark your thread as SOLVED once you have your answer. Thanks!-Lee
    Last edited by leelnich; 08-09-2017 at 04:12 PM.

+ 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. Counting problems: count rang values while condition is true
    By nemsho in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-11-2017, 05:10 PM
  2. Count Until empty cell (condition to stop counting)
    By danielpp in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-30-2016, 02:50 PM
  3. [SOLVED] How to count a condition based on having another condition?
    By Robster in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-12-2014, 04:17 PM
  4. running total that restarts
    By Ged_UK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-09-2013, 01:25 PM
  5. Counting until a condition and then, again counting from start
    By amitraiforyou in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-13-2010, 05:25 PM
  6. Count cells in range that restarts at intervals
    By Melissa in forum Excel General
    Replies: 2
    Last Post: 08-19-2005, 10:05 AM
  7. RE: Count cells in range that restarts at intervals
    By Rowan in forum Excel General
    Replies: 0
    Last Post: 08-19-2005, 01:05 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