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

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.
This should work

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

Hope this helps...
 
Upvote 0

Forum statistics

Threads
1,215,694
Messages
6,126,258
Members
449,307
Latest member
Andile

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