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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
This should work

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

Hope this helps...
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,413
Members
449,082
Latest member
tish101

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