Frequency of unique values in a single column

lynnht

New Member
Joined
Jul 25, 2011
Messages
2
Hello. I would like to know how many times a value is listed.

e.g.

a
a
a
b
b
c
c
d
d
d
d

result to show as:
a 3
b 2
c 2
d 4

I've seen postings on how to do this if your values are numerical (using FREQUENCY array), but not with generic data. I appreciate the help!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Have you thought about using a pivot table, it would be very quick and give you the info you want.
 
Upvote 0
Welcome to the Board!

Tom's quite right - a Pivot Table would work well.

But if you're after a formula solution, COUNTIF would do what you want. Like:

=COUNTIF(A$1:A$11,C1)

Where C1 is a value of interest, like "a".

Matty
 
Upvote 0
Actually, with a formula approach, considering this as written...

result to show as:
a 3
b 2
c 2
d 4

...that table can be achieved as follows, assuming this list is in A1:A50.

In cell B2 would be the formula
=INDEX($A$1:$A$50,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$50),0))
which would be committed to the cell with Ctrl+Shift+Enter, not just with Enter, and then dragged down until it returns an error.

Then, in cell C2 and copied down would be
=COUNTIF($A$1:$A$50,B2)

and that would mimic by way of formula the table result.
 
Upvote 0
Thank you both!! The formulas produced the exact table I was trying to create. I appreciate your help & superquick response! :)
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,593
Members
452,654
Latest member
mememe101

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top