Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Resources > Mathematics Software Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old September 29th, 2009, 03:30 PM
Junior Member
 
Join Date: Apr 2008
Posts: 64
Country:
Thanks: 10
Thanked 0 Times in 0 Posts
deragon999 is on a distinguished road
Default [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.
Reply With Quote
Advertisement
 
  #2  
Old September 29th, 2009, 03:35 PM
pickslides's Avatar
MHF Contributor
 
Join Date: Sep 2008
Location: Melbourne
Posts: 2,018
Country:
Thanks: 100
Thanked 650 Times in 618 Posts
pickslides is a splendid one to beholdpickslides is a splendid one to beholdpickslides is a splendid one to beholdpickslides is a splendid one to beholdpickslides is a splendid one to beholdpickslides is a splendid one to behold
Send a message via MSN to pickslides
Default

Do you have an example of the data you can upload?
__________________
Knowledge speaks, but wisdom listens.
Reply With Quote
  #3  
Old September 29th, 2009, 03:44 PM
Junior Member
 
Join Date: Apr 2008
Posts: 64
Country:
Thanks: 10
Thanked 0 Times in 0 Posts
deragon999 is on a distinguished road
Default

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
Reply With Quote
  #4  
Old September 29th, 2009, 03:52 PM
Owner of The Art of the Proof
 
Join Date: May 2009
Location: New York
Posts: 472
Country:
Thanks: 12
Thanked 169 Times in 162 Posts
artvandalay11 has a spectacular aura aboutartvandalay11 has a spectacular aura about
Default

I got 6 switches in that set you posted, and if you agree with 6 i might have a solution to your problem
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote
  #5  
Old September 29th, 2009, 03:59 PM
Junior Member
 
Join Date: Apr 2008
Posts: 64
Country:
Thanks: 10
Thanked 0 Times in 0 Posts
deragon999 is on a distinguished road
Default

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
Reply With Quote
  #6  
Old September 29th, 2009, 04:02 PM
Owner of The Art of the Proof
 
Join Date: May 2009
Location: New York
Posts: 472
Country:
Thanks: 12
Thanked 169 Times in 162 Posts
artvandalay11 has a spectacular aura aboutartvandalay11 has a spectacular aura about
Default

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
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote
The following users thank artvandalay11 for this useful post:
Donate to MHF
  #7  
Old September 29th, 2009, 04:04 PM
Owner of The Art of the Proof
 
Join Date: May 2009
Location: New York
Posts: 472
Country:
Thanks: 12
Thanked 169 Times in 162 Posts
artvandalay11 has a spectacular aura aboutartvandalay11 has a spectacular aura about
Default

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
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote
  #8  
Old September 29th, 2009, 04:19 PM
Junior Member
 
Join Date: Apr 2008
Posts: 64
Country:
Thanks: 10
Thanked 0 Times in 0 Posts
deragon999 is on a distinguished road
Default

Thank you very much for all you help, i got the right results so alls good
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 01:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.