ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need help similar to a histogram (https://www.excelbanter.com/excel-programming/318709-need-help-similar-histogram.html)

DonD

Need help similar to a histogram
 
Greetings,


I am trying to analyze some data that looks like this:
Time Flag
14:30:02 0
14:30:16 0
14:30:32 0
14:30:32 0
14:30:48 0
14:30:48 0
14:30:56 0
14:30:57 0
14:31:09 0
14:31:10 1
14:31:14 1
14:31:15 0
14:31:20 0
14:31:23 0
14:31:37 0
14:31:41 0
14:31:45 0
14:31:57 0
14:31:57 0
14:31:59 1
14:32:14 0
14:32:16 0
14:32:20 0
14:32:23 0
14:32:27 0
14:32:28 0
and so on....


From this data I want to make a kind of histogram of how many flags appeared
in a given time range, say every 2 minutes. So for example, a sum of the
flags each 2 minute period.


Thanks and cheers

Don

Tom Ogilvy

Need help similar to a histogram
 
would this

14:31:09 0
14:31:10 1
14:31:14 1
14:31:15 0


be one flag or two?

--
Regards,
Tom Ogilvy

"DonD" wrote in message
...
Greetings,


I am trying to analyze some data that looks like this:
Time Flag
14:30:02 0
14:30:16 0
14:30:32 0
14:30:32 0
14:30:48 0
14:30:48 0
14:30:56 0
14:30:57 0
14:31:09 0
14:31:10 1
14:31:14 1
14:31:15 0
14:31:20 0
14:31:23 0
14:31:37 0
14:31:41 0
14:31:45 0
14:31:57 0
14:31:57 0
14:31:59 1
14:32:14 0
14:32:16 0
14:32:20 0
14:32:23 0
14:32:27 0
14:32:28 0
and so on....


From this data I want to make a kind of histogram of how many flags

appeared
in a given time range, say every 2 minutes. So for example, a sum of the
flags each 2 minute period.


Thanks and cheers

Don




Tom Ogilvy

Need help similar to a histogram
 
If each 1 is a flag,

In D1 for example, I would put in my start time
in D2
=D1+TimeValue("00:02")


In E1 I would put in

=Countif(A:A,"="&D1.B:B)-Countif(A:A,"="&D2,B:B)

Now select E1 and copy it to E2.

Select D2:E2 and drag fill down the column.

Then you can do your histogram on this data.

--
Regards,
Tom Ogilvy



"DonD" wrote in message
...
Greetings,


I am trying to analyze some data that looks like this:
Time Flag
14:30:02 0
14:30:16 0
14:30:32 0
14:30:32 0
14:30:48 0
14:30:48 0
14:30:56 0
14:30:57 0
14:31:09 0
14:31:10 1
14:31:14 1
14:31:15 0
14:31:20 0
14:31:23 0
14:31:37 0
14:31:41 0
14:31:45 0
14:31:57 0
14:31:57 0
14:31:59 1
14:32:14 0
14:32:16 0
14:32:20 0
14:32:23 0
14:32:27 0
14:32:28 0
and so on....


From this data I want to make a kind of histogram of how many flags

appeared
in a given time range, say every 2 minutes. So for example, a sum of the
flags each 2 minute period.


Thanks and cheers

Don




DonD

Need help similar to a histogram
 
Thanks Tom.

dd

"Tom Ogilvy" wrote:

If each 1 is a flag,

In D1 for example, I would put in my start time
in D2
=D1+TimeValue("00:02")


In E1 I would put in

=Countif(A:A,"="&D1.B:B)-Countif(A:A,"="&D2,B:B)

Now select E1 and copy it to E2.

Select D2:E2 and drag fill down the column.

Then you can do your histogram on this data.

--
Regards,
Tom Ogilvy



"DonD" wrote in message
...
Greetings,


I am trying to analyze some data that looks like this:
Time Flag
14:30:02 0
14:30:16 0
14:30:32 0
14:30:32 0
14:30:48 0
14:30:48 0
14:30:56 0
14:30:57 0
14:31:09 0
14:31:10 1
14:31:14 1
14:31:15 0
14:31:20 0
14:31:23 0
14:31:37 0
14:31:41 0
14:31:45 0
14:31:57 0
14:31:57 0
14:31:59 1
14:32:14 0
14:32:16 0
14:32:20 0
14:32:23 0
14:32:27 0
14:32:28 0
and so on....


From this data I want to make a kind of histogram of how many flags

appeared
in a given time range, say every 2 minutes. So for example, a sum of the
flags each 2 minute period.


Thanks and cheers

Don






All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com