Countif range contains part of a value

A

antwaan

I have a range of cells in column A. The values may range from:
10041, 10041B to 10041PEM

I need a formula to count the number of "41" that occurs. Please help!
 
G

Glenn

antwaan said:
I have a range of cells in column A. The values may range from:
10041, 10041B to 10041PEM

I need a formula to count the number of "41" that occurs. Please help!


Any "41", like "10412" and "14102PEM"? What about "14141B"...is that counted
once or twice?

Or are you looking for only where "41" are the 4th and 5th characters in the cell?
 
J

Jacob Skaria

Some of the cells may be in number format.

Suppose A is the column you have with this data..
in Col B enter the formula B1 = TEXT(A1,"?")
and then try

=COUNTIF(B:B,"*41*")


If this post helps click Yes
 
J

Jacob Skaria

Oops
B1 = T(A1). Copy that down...which will convert the values to text and then
apply CountIF

If this post helps click Yes
 
A

antwaan

Glenn - this worked great. Now I don't have to add in another column to
convert to text; plus it's more accurate.
Thanks again.
 
G

Glenn

Glad I could help.

Your responses here will almost always be more accurate when you provide more
information. Your original request was open to many interpretations and
possible solutions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top