简体   繁体   中英

Counting instances of various unique strings in a column on Excel

I have a column in Excel that lists many unique strings. Some strings come up only once, while others are repeated say 20 times. I want to generate a list that shows how many times each unique string comes up (eg, asldk 1, fhfi 5, bqod 22). Is there any easy way to do this? There are about 10,000 rows in this column so really do not want to go piece by piece countif each new string I come across.

Assuming your data is in column A. Copy it to column C, select it, then Data > remove duplicate.

In D1, put :

=countif(a:a,C1)

and drag downwards.

Please share if it works/not. ( :

If you have a version of Excel that supports the new Dynamic Array feature:

Assuming your data is in column A , place this formula in say, C1

=UNIQUE(FILTER(A:A,A:A<>0),FALSE)

Then, in D1 put this formula

=COUNTIFS(A:A,C1#)

Sample

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM