Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Counting Characters In A String

Hi

I am trying to manipulate some data strings and I want to count how many
times the characters '(' and ')' occur in each of the data strings on my
spreadsheet. I have tried some simple options but am unable to achieve the
result I want.

I would be very grateful if anyone is able to provide me with a method of
doing this.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Counting Characters In A String

To count from a data string which is in cell A1 use the below

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

To count all in a spreadsheet use the Find Dialog box and enter "(" and hit
FindAll which will list all the occurences and give a count at the bottom.
Make sure you select the option appropriately to avoid looking at
formulas....(If thats is your requirement)

--
Jacob (MVP - Excel)


"fabio" wrote:

Hi

I am trying to manipulate some data strings and I want to count how many
times the characters '(' and ')' occur in each of the data strings on my
spreadsheet. I have tried some simple options but am unable to achieve the
result I want.

I would be very grateful if anyone is able to provide me with a method of
doing this.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Counting Characters In A String

Thank you Jacob. That worked fine as I did want it on a cell by cell basis.

"Jacob Skaria" wrote:

To count from a data string which is in cell A1 use the below

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

To count all in a spreadsheet use the Find Dialog box and enter "(" and hit
FindAll which will list all the occurences and give a count at the bottom.
Make sure you select the option appropriately to avoid looking at
formulas....(If thats is your requirement)

--
Jacob (MVP - Excel)


"fabio" wrote:

Hi

I am trying to manipulate some data strings and I want to count how many
times the characters '(' and ')' occur in each of the data strings on my
spreadsheet. I have tried some simple options but am unable to achieve the
result I want.

I would be very grateful if anyone is able to provide me with a method of
doing this.

Thanks

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
Cut the last 20 characters out of a text string Michael Excel Discussion (Misc queries) 4 November 4th 09 11:13 AM
Extract characters from Right of string ashg657 Excel Worksheet Functions 5 July 30th 09 11:16 AM
Insert Leading Characters If String Is Only 7 Characters Paperback Writer Excel Discussion (Misc queries) 2 April 21st 09 09:07 PM
counting the number of instances of a string within another string Keith R Excel Worksheet Functions 3 March 5th 07 06:54 PM
get characters from a string in excel Joao Excel Worksheet Functions 2 June 8th 05 09:47 AM


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