#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Count within a cell


Is there any way of performing a count on an individual cell to identify
the number of occurances of a specified character within that cell?

e.g. Cell contains AAA_BBB_CCC_DDD

I would like the number of underscores (3) to be returned and this
value placed in a new cell?

Thanks


--
presuming ed
------------------------------------------------------------------------
presuming ed's Profile: http://www.excelforum.com/member.php...o&userid=31526
View this thread: http://www.excelforum.com/showthread...hreadid=573700

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Count within a cell

A1=AAA_BBB_CCC_DDD then in B1:

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

Replace "_" with required character

HTH

"presuming ed" wrote:


Is there any way of performing a count on an individual cell to identify
the number of occurances of a specified character within that cell?

e.g. Cell contains AAA_BBB_CCC_DDD

I would like the number of underscores (3) to be returned and this
value placed in a new cell?

Thanks


--
presuming ed
------------------------------------------------------------------------
presuming ed's Profile: http://www.excelforum.com/member.php...o&userid=31526
View this thread: http://www.excelforum.com/showthread...hreadid=573700


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Count within a cell

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

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"presuming ed"
wrote in message
...

Is there any way of performing a count on an individual cell to identify
the number of occurances of a specified character within that cell?

e.g. Cell contains AAA_BBB_CCC_DDD

I would like the number of underscores (3) to be returned and this
value placed in a new cell?

Thanks


--
presuming ed
------------------------------------------------------------------------
presuming ed's Profile:

http://www.excelforum.com/member.php...o&userid=31526
View this thread: http://www.excelforum.com/showthread...hreadid=573700



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 179
Default Count within a cell

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

"presuming ed" wrote:


Is there any way of performing a count on an individual cell to identify
the number of occurances of a specified character within that cell?

e.g. Cell contains AAA_BBB_CCC_DDD

I would like the number of underscores (3) to be returned and this
value placed in a new cell?

Thanks


--
presuming ed
------------------------------------------------------------------------
presuming ed's Profile: http://www.excelforum.com/member.php...o&userid=31526
View this thread: http://www.excelforum.com/showthread...hreadid=573700


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Count within a cell


Thanks,

works perfectly!


--
presuming ed
------------------------------------------------------------------------
presuming ed's Profile: http://www.excelforum.com/member.php...o&userid=31526
View this thread: http://www.excelforum.com/showthread...hreadid=573700

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
Count # of A's in a Cell JavyD Excel Worksheet Functions 0 February 6th 06 09:31 PM
Cell Count bombayterror New Users to Excel 2 January 21st 06 09:33 PM
Count on cell for each time it is changed Jelinek Excel Discussion (Misc queries) 3 January 9th 06 02:22 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


All times are GMT +1. The time now is 02:42 AM.

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

About Us

"It's about Microsoft Excel"