I have a column with time data like this:
17:27:31
17:27:32
17:27:32
17:27:33
17:27:33
17:27:34
17:27:34
17:27:34
17:27:35
17:27:36
I want to count how many times each value repeats:
Value Count
17:27:31 1
17:27:32 2
17:27:33 2
17:27:34 3
17:27:35 1
17:27:36 1
How can I do such a thing?
The quickest way would be with a pivot table. Make sure your column of data has a header row, highlight the data and the header, from the insert ribbon select pivot table and then drag your header from the pivot table fields list to the row labels and to the values boxes.
I second Dave's idea. I'm not always fond of pivot tables, but in this case they are pretty straightforward to use.
Here are my results:
It was so simple to create it that I have even recorded a macro in case you need to do this with VBA:
You can use
CountIf
. Put the following code in B1 and drag down the whole columnIt will look like this: