Results 1 to 8 of 8

Math Help - [SOLVED] Excel on off count

  1. #1
    Junior Member
    Joined
    Apr 2008
    Posts
    72

    [SOLVED] Excel on off count

    Hey guys
    I basicly have a column of 1s and 0s(on and off), and i need to know the total number of times the machine starts, including the first time.
    The machine starts every time the data switches from a 0(or group of 0s) to a 1.
    How would i go about writing an equation(probly containing the IF command) to count these iterations?

    Cheers.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Master Of Puppets
    pickslides's Avatar
    Joined
    Sep 2008
    From
    Melbourne
    Posts
    5,236
    Thanks
    28
    Do you have an example of the data you can upload?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Apr 2008
    Posts
    72
    im not sure how to put the file in, but heres a simplified version:

    1
    1
    1
    1
    1
    1
    1
    0
    0
    0
    0
    0
    0
    1
    1
    1
    0
    0
    0
    0
    1
    1
    1
    1
    1
    0
    1

    Theres four times that it is switched on in that set by my count, the real set has thousands of data
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Banned
    Joined
    May 2009
    Posts
    471
    I got 6 switches in that set you posted, and if you agree with 6 i might have a solution to your problem
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Apr 2008
    Posts
    72
    I only want when it switches to on, or from off to on, here are my switches:

    HERE
    1
    1
    1
    1
    1
    1
    1
    0
    0
    0
    0
    0
    0
    HERE
    1
    1
    1
    0
    0
    0
    0
    HERE
    1
    1
    1
    1
    1
    0
    HERE
    1
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Banned
    Joined
    May 2009
    Posts
    471
    Quote Originally Posted by deragon999 View Post
    I only want when it switches to on, or from off to on, here are my switches:

    HERE
    1
    1
    1
    1
    1
    1
    1
    0
    0
    0
    0
    0
    0
    HERE
    1
    1
    1
    0
    0
    0
    0
    HERE
    1
    1
    1
    1
    1
    0
    HERE
    1

    alright sorry I didn't realize you only wanted switching from 0 to 1,

    So let's say your list starts in the cell A1,

    use this function is a cell =IF(AND(A1=0,A2=1),1,0) and drag it down

    Then at the bottom of the collum, make one cell equal to the sum of the column =Sum(A1:A_n) and then add 1 to that number if your number in A1 is a 1, don't add 1 if it's a 0 in A1
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Banned
    Joined
    May 2009
    Posts
    471
    you could always just put a 0 in first if your first number is a 1, and then not worry about the adding 1 to the sum business
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member
    Joined
    Apr 2008
    Posts
    72
    Thank you very much for all you help, i got the right results so alls good
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. What does 3^n count?
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: February 7th 2011, 02:59 AM
  2. triangular count
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: April 27th 2010, 07:22 AM
  3. Learning to count!
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: January 14th 2009, 04:02 AM
  4. How to count?
    Posted in the Math Challenge Problems Forum
    Replies: 3
    Last Post: October 7th 2008, 05:17 AM
  5. [SOLVED] Adding two Coloumns in Excel 2007
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 16th 2008, 12:59 AM

Search Tags


/mathhelpforum @mathhelpforum