Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default counting a certain character

I have a cell with this the following data in it:
0800_______________________ 00000001 00005212 00012312

I would like to count the number of "_" in the cell. I have tried the
countif(A1,"*_*") but I only get a return of 1 count. I would like to know
how many of the "_" there are in the cell.

Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default counting a certain character

Try,

=LEN(A1)-LEN(SUBSTITUTE(A1,"_",""))

Mike

"James" wrote:

I have a cell with this the following data in it:
0800_______________________ 00000001 00005212 00012312

I would like to count the number of "_" in the cell. I have tried the
countif(A1,"*_*") but I only get a return of 1 count. I would like to know
how many of the "_" there are in the cell.

Thanks for the help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default counting a certain character

It works and I was able to go through my 30,000 row spreadsheet and easily
see that there are difference with all the "_". It helped a great deal.

"Mike H" wrote:

Try,

=LEN(A1)-LEN(SUBSTITUTE(A1,"_",""))

Mike

"James" wrote:

I have a cell with this the following data in it:
0800_______________________ 00000001 00005212 00012312

I would like to count the number of "_" in the cell. I have tried the
countif(A1,"*_*") but I only get a return of 1 count. I would like to know
how many of the "_" there are in the cell.

Thanks for the help.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default counting a certain character

Your welcome

"James" wrote:

It works and I was able to go through my 30,000 row spreadsheet and easily
see that there are difference with all the "_". It helped a great deal.

"Mike H" wrote:

Try,

=LEN(A1)-LEN(SUBSTITUTE(A1,"_",""))

Mike

"James" wrote:

I have a cell with this the following data in it:
0800_______________________ 00000001 00005212 00012312

I would like to count the number of "_" in the cell. I have tried the
countif(A1,"*_*") but I only get a return of 1 count. I would like to know
how many of the "_" there are in the cell.

Thanks for the help.

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
Counting Specific Character(s) In A Range? FARAZ QURESHI Excel Discussion (Misc queries) 10 September 14th 07 04:32 AM
simple, counting the last character in text JVANWORTH Excel Worksheet Functions 7 July 13th 07 07:33 PM
Counting Cells w/ a certain character in them? BradS Excel Discussion (Misc queries) 1 February 28th 07 04:21 PM
Finding/counting a given character within a cell Bob Excel Worksheet Functions 10 June 7th 06 12:06 AM
COUNTIF not counting properly!! Character limit? kytihu Excel Worksheet Functions 2 January 30th 06 04:45 PM


All times are GMT +1. The time now is 09:14 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"