How to exclude a character

Barry

New Member
Joined
Jun 10, 2002
Messages
18
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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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
 
Upvote 0
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?
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,224,267
Messages
6,177,549
Members
452,783
Latest member
back1ply

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