Counting occurances

lecxE

Board Regular
Joined
Apr 9, 2002
Messages
121
Say I have column A filled with 10000 rows containing letters of the alphabet.

If I want a count of all the "J", "K", & "P" cells I could use:

=COUNTIF(A1:A10000,"A")+COUNTIF(A1:A10000,"B")+COUNTIF(A1:A10000,"C")

That works great.

What if I want to list values in column C and count the occurances of the values in column A. For example, in C1:C18 I'd like to put 18 letters of the alphabet and show the count in D1 of those letters that are in column A?

If there a better way the adding together 18 COUNTIF's?

Thanks.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
This should work

=SUMPRODUCT(--(ISNUMBER(MATCH(C1:C18,A1:A10000,0))))

Hope this helps...
 
Upvote 0

Forum statistics

Threads
1,191,388
Messages
5,986,321
Members
440,017
Latest member
vasanrajeswaran

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
Top