Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Countif range contains part of a value

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!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Countif range contains part of a value

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

If this post helps click Yes
---------------
Jacob Skaria


"antwaan" wrote:

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!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Countif range contains part of a value

antwaan wrote:
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?
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Countif range contains part of a value

Thanks Jacob, but this formula does not produce accurate results.

"Jacob Skaria" wrote:

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

If this post helps click Yes
---------------
Jacob Skaria


"antwaan" wrote:

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!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Countif range contains part of a value

"41" will always be the 4th & 5th characters in the cell.


"Glenn" wrote:

antwaan wrote:
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?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Countif range contains part of a value

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
---------------
Jacob Skaria


"antwaan" wrote:

Thanks Jacob, but this formula does not produce accurate results.

"Jacob Skaria" wrote:

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

If this post helps click Yes
---------------
Jacob Skaria


"antwaan" wrote:

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!

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Countif range contains part of a value

Try this:

=SUMPRODUCT(--(MID(A1:A100,4,2)="41"))

antwaan wrote:
"41" will always be the 4th & 5th characters in the cell.


"Glenn" wrote:

antwaan wrote:
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?

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Countif range contains part of a value

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

If this post helps click Yes
---------------
Jacob Skaria


"antwaan" wrote:

Thanks Jacob, but this formula does not produce accurate results.

"Jacob Skaria" wrote:

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

If this post helps click Yes
---------------
Jacob Skaria


"antwaan" wrote:

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!

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Countif range contains part of a value

=TEXT(A1,"?") worked, =T(A1) didn't.

Thank you Jacob!


"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"antwaan" wrote:

Thanks Jacob, but this formula does not produce accurate results.

"Jacob Skaria" wrote:

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

If this post helps click Yes
---------------
Jacob Skaria


"antwaan" wrote:

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!

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Countif range contains part of a value

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.


"Glenn" wrote:

Try this:

=SUMPRODUCT(--(MID(A1:A100,4,2)="41"))

antwaan wrote:
"41" will always be the 4th & 5th characters in the cell.


"Glenn" wrote:

antwaan wrote:
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?




  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Countif range contains part of a value

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.



antwaan wrote:
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.


"Glenn" wrote:

Try this:

=SUMPRODUCT(--(MID(A1:A100,4,2)="41"))

antwaan wrote:
"41" will always be the 4th & 5th characters in the cell.


"Glenn" wrote:

antwaan wrote:
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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find part data in row range? Fluke Excel Worksheet Functions 1 September 11th 06 11:31 PM
Sumif with a range (part II) Metolius Dad Excel Worksheet Functions 1 February 13th 06 05:11 PM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
Painting Range - extend the range on the top part Shrikant Excel Discussion (Misc queries) 4 September 1st 05 11:18 AM
summing part of cells in a range excelFan Excel Discussion (Misc queries) 2 December 5th 04 12:33 PM


All times are GMT +1. The time now is 09:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"