spill-the-beans
Board Regular
- Joined
- Feb 7, 2013
- Messages
- 52
Hello,
I have a rather large dataset, and apart from the top row (which is a header row), all the data is either a 0 or a 1. Just looking at one column, I could have something like:
<tbody>
</tbody>
In another sheet, I would like a summary of information in just the data column B. There are two things I need to know:
1. How many series of 1s (so 2 or more 1s one after the other vertically) there were in the entire column. There will never be a 1 by itself with a 0 both above and below it.
2. How long each individual series was - so how many 1s there were in that vertical series.
So for the example above, I would ideally end up with something that looks like:
<tbody>
</tbody>
If anyone can help me, please let me know! At the moment I am counting by hand!
I have a rather large dataset, and apart from the top row (which is a header row), all the data is either a 0 or a 1. Just looking at one column, I could have something like:
A | B |
index | data |
1 | 0 |
2 | 0 |
3 | 1 |
4 | 1 |
5 | 1 |
6 | 0 |
7 | 0 |
8 | 0 |
9 | 1 |
10 | 1 |
11 | 0 |
12 | 1 |
13 | 1 |
14 | 1 |
15 | 1 |
<tbody>
</tbody>
In another sheet, I would like a summary of information in just the data column B. There are two things I need to know:
1. How many series of 1s (so 2 or more 1s one after the other vertically) there were in the entire column. There will never be a 1 by itself with a 0 both above and below it.
2. How long each individual series was - so how many 1s there were in that vertical series.
So for the example above, I would ideally end up with something that looks like:
How many series? | 3 |
Length of 1st series | 3 |
Length of 2nd series | 2 |
Length of 3rd series | 4 |
<tbody>
</tbody>
If anyone can help me, please let me know! At the moment I am counting by hand!