# How to exclude a character

#### Barry

##### New Member
The following formula: =COUNTIF(AD11:AD28,"<>A*")-COUNTIF(AD11:AD28,"") as an example, calculates all characters, A through Z. What I want to accomplish is for this formula to continue calculating all characters EXCEPT the letter C. What change would I have to make? Thanks...Barry

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### barry houdini

##### MrExcel MVP
Hi Barry,

Great name

The formula you quote will count cells within your range that are not blank and don't begin with "A" - that doesn't quite match your description.

Can you explain in words exactly what you want to achieve, with an example if possible

#### Yogi Anand

##### MrExcel MVP
Barry said:
The following formula: =COUNTIF(AD11:AD28,"<>A*")-COUNTIF(AD11:AD28,"") as an example, calculates all characters, A through Z. What I want to accomplish is for this formula to continue calculating all characters EXCEPT the letter C. What change would I have to make? Thanks...Barry
Hi Barry:

Let us look at ...
Book2
ABCD
11A7
12B
13
14
15K
162
175
18Z
19
209
21P
22
23C
24
25B
26G
27
28
Sheet9

I have used column A rather than your column AD, and I have assumed that the entries in cells A11:A28 are either alphbets (no punctuation characters), or numeric digits.

formula in cell C11 is ... =SUM(COUNTIF(A11:A28,{"*","C"})*{1,-1})

Is this what you are looking for?

#### Barry

##### New Member
Yogi, Yes this formula works very well. The range of cells recognizes all characters of the alphabet except the letter "C" just like I requested. Thank you very much...Barry

Replies
4
Views
305
Replies
3
Views
107
Replies
2
Views
82
Replies
6
Views
129
Replies
2
Views
318

1,196,010
Messages
6,012,841
Members
441,733
Latest member
MartijnB

### 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