Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Count occurrences of values

I have a column of text values with repeated values. I want to create a new column of unique values (no repeats) and a column with the frequency of each of those values.

What's the easiest way to do that? Efficiency isn't much of a concern as it's under 10,000 rows.

like image 263
sagacious Avatar asked Oct 31 '12 04:10

sagacious


Video Answer


1 Answers

For the sake of an answer rather than comments, copy column (say A) to B (say) and for B only Data > Data Tools – Remove Duplicates then in C2 enter:

=COUNTIF(A:A,B2)  

and copy down as required

OR (preferred option)

use a PivotTable as @Tim:

SO13151320 example

like image 157
pnuts Avatar answered Oct 05 '22 15:10

pnuts