Count a specific letter/number combination?

ntech

New Member
Joined
Oct 7, 2017
Messages
21
wVcYqwX.jpg
[/IMG]

This is an example of a formula I would like to house in the AD4 cell that will count only the cells that contain the following number/”C” combination such as:

0-9C
10-99C
100-999C

I would like the formula to exclude the “CO” code along with values that do not have a "C" on the end.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Thank you, that works!
Just checking... could you ever have text in a cell that ends in C with a non-digit somewhere in front of it (such as CC, MAC, A4C, etc.)? If so, shg's formula with count them and we would need to give you a different formula.
 
Last edited:
Upvote 0
I listed all of the letter codes that are currently in place in the original picture. However it is possible there may be new codes developed in the future that may have a non-digit in front of a C as you mentioned. It wouldn't hurt to write an exclusion.
 
Upvote 0
=countif(thatRange, "*C")

When the range to be counted is blank, the formula returns a value of 0. Is it possible to write an addendum into the code that ensures the cell (AD4) containing the formula is blank?
 
Upvote 0
The count returned is accurate, right?

You can format the cell to suppress display of zero, or select the option that the sheet not display zero values, or leave as it (correctly) is.
 
Upvote 0
It is accurate. I will set up the formatting option. Thank you!

The count returned is accurate, right?

You can format the cell to suppress display of zero, or select the option that the sheet not display zero values, or leave as it (correctly) is.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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