# Counting occurances

#### lecxE

##### Board Regular
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
This should work

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

Hope this helps...

Replies
0
Views
600
Replies
5
Views
1K
Replies
0
Views
240
Replies
4
Views
485
Replies
11
Views
276

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.

### Which adblocker are you using?

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

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