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

Aitch

Board Regular
Joined
Jan 27, 2019
Messages
119
Office Version
  1. 2010
Platform
  1. Windows
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

[TABLE="class: grid, width: 100, align: center"]
<tbody>[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A4567[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3546[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23A78[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]765[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2A6A8[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Maybe:
Excel Workbook
ABC
13
23
312345
4A4567
53546
623A78
7765
82A6A8
Sheet1
 
Upvote 0
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?
 
Upvote 0
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?
 
Upvote 0
Yup!

[TABLE="class: grid, width: 100, align: center"]
<tbody>[TR]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]123456
[/TD]
[/TR]
[TR]
[TD]12A34B[/TD]
[/TR]
[TR]
[TD]1CC345[/TD]
[/TR]
[TR]
[TD]1ABCD5[/TD]
[/TR]
[TR]
[TD]111222[/TD]
[/TR]
[TR]
[TD]ABCDEF[/TD]
[/TR]
[TR]
[TD]123123[/TD]
[/TR]
[TR]
[TD]123EF6[/TD]
[/TR]
</tbody>[/TABLE]


So in the column, there are 5 cells which contain letters - is there a way to use COUNTIF to find this value?
 
Upvote 0
Assuming all of the cells are not formatted as Text...

=COUNTA(A2:A9)-COUNT(A2:A9)
 
Upvote 0
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
 
Upvote 0
Yes, the formatting is Text... dangit!

Is it still possible to do somehow?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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