+ Reply to Thread
Results 1 to 4 of 4

reset to zero

  1. #1
    Registered User
    Join Date
    10-01-2005
    Posts
    1

    reset to zero

    i need to keep a running total of a random series of numbers in a column and when a zero appears i need it reset to zero and start counting again from the next number, hope i explained this as easy as possible? thanks for any help.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Assuming that your numbers are in column A, in cell B1 put
    =A1

    in cell B2 put
    =if(A2=0,0,B1+A2)

    and formula-copy that to the end of your numbers.



    Quote Originally Posted by baldyheed
    i need to keep a running total of a random series of numbers in a column and when a zero appears i need it reset to zero and start counting again from the next number, hope i explained this as easy as possible? thanks for any help.

  3. #3
    Biff
    Guest

    Re: reset to zero

    Hi!

    Assume the numbers are in the range A1:An

    Enter this formula in B1:

    =(A1>0)*1

    Enter this formula in B2 and copy down as needed:

    =IF(A2=0,0,B1+1)

    Biff

    "baldyheed" <[email protected]> wrote
    in message news:[email protected]...
    >
    > i need to keep a running total of a random series of numbers in a column
    > and when a zero appears i need it reset to zero and start counting again
    > from the next number, hope i explained this as easy as possible? thanks
    > for any help.
    >
    >
    > --
    > baldyheed
    > ------------------------------------------------------------------------
    > baldyheed's Profile:
    > http://www.excelforum.com/member.php...o&userid=27721
    > View this thread: http://www.excelforum.com/showthread...hreadid=472366
    >




  4. #4
    Biff
    Guest

    Re: reset to zero

    >reset to zero and start counting again

    I thought they wanted a count.

    Well, either way we got it covered!

    Biff

    "Bryan Hessey" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Assuming that your numbers are in column A, in cell B1 put
    > =A1
    >
    > in cell B2 put
    > =if(A2=0,0,B1+A2)
    >
    > and formula-copy that to the end of your numbers.
    >
    >
    >
    > baldyheed Wrote:
    >> i need to keep a running total of a random series of numbers in a column
    >> and when a zero appears i need it reset to zero and start counting again
    >> from the next number, hope i explained this as easy as possible? thanks
    >> for any help.

    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile:
    > http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=472366
    >




+ 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