Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many times does each value appear in a column?

Tags:

excel

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?

like image 770
user2612499 Avatar asked Sep 06 '13 15:09

user2612499


People also ask

How many times a value appears in a column?

Use the COUNTIF function to count how many times a particular value appears in a range of cells.

How do I count occurrences in Excel column?

You can use the =UNIQUE() and =COUNTIF() functions to count the number of occurrences of different values in a column in Excel.

How do you check if a value appears more than once in Excel?

Select the data you want to check for duplicates. This can be a column, a row or a range of cells. On the Home tab, in the Styles group, click Conditional Formatting > Highlight Cells Rules > Duplicate Values…


2 Answers

You can use CountIf. Put the following code in B1 and drag down the whole column

=COUNTIF(A:A,A1)

It will look like this:

enter image description here

like image 65
KyleMit Avatar answered Oct 12 '22 10:10

KyleMit


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.

like image 31
Dave Sexton Avatar answered Oct 12 '22 11:10

Dave Sexton