# COUNTIF question - counting cells which contain a specific letter...

#### Aitch

##### Board Regular
Is there a way to use the COUNTIF function to count cells if they contain a single letter - for example below, when a cell has the letter A, the count would be 3 in the top row

 3 12345 A4567 3546 23A78 765 2A6A8

<tbody>
</tbody>

I thought it would be easy using wildcards, but is doesn't seem to work... and I think having two letters in the cell makes things worse!

Thanks for helping!

Last edited:

### Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Maybe:
Excel Workbook
ABC
13
23
312345
4A4567
53546
623A78
7765
82A6A8
Sheet1

#### Aitch

##### Board Regular
I tried that - but forgot the "" lol... thank you!

Is there a way to count cells which contain a number of different letters, or even any kind of alphabetical character?

#### JoeMo

##### MrExcel MVP
I tried that - but forgot the "" lol... thank you!

Is there a way to count cells which contain a number of different letters, or even any kind of alphabetical character?
You are welcome - thanks for the reply. Can you be a bit more descriptive on your new question and maybe provide a few examples of what you want to do?

#### Aitch

##### Board Regular
Yup!

 5 123456 12A34B 1CC345 1ABCD5 111222 ABCDEF 123123 123EF6

<tbody>
</tbody>

So in the column, there are 5 cells which contain letters - is there a way to use COUNTIF to find this value?

#### Rick Rothstein

##### MrExcel MVP
Assuming all of the cells are not formatted as Text...

=COUNTA(A2:A9)-COUNT(A2:A9)

#### XOR LX

##### Well-known Member
Assuming all of the cells are not formatted as Text...

=COUNTA(A2:A9)-COUNT(A2:A9)
If your assumption is correct then we can also use:

=COUNTIF(A2:A9,"?*")

though note that your count will also include any null strings ("") within the range, should there be any.

Regards

#### Aitch

##### Board Regular
Yes, the formatting is Text... dangit!

Is it still possible to do somehow?

#### Phuoc

##### Board Regular
Try

=SUMPRODUCT(--ISERROR(--(0&A2:A9)))

#### Aitch

##### Board Regular
Try

=SUMPRODUCT(--ISERROR(--(0&A2:A9)))
Tried but doesn't seem to work... thank you anyway!

1,102,665
Messages
5,488,179
Members
407,630
Latest member
Mehezabin

### This Week's Hot Topics

• Timer in VBA - Stop, Start, Pause and Reset
[CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
• how to updates multiple rows in muliselect listbox
Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
• Delete Row from Table
I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
• Assigning to a variable
I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
• Way to verify information
Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
• Active Cell Address – Inactive Sheet
How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...