Counting Characters In A String

F

fabio

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
 
J

Jacob Skaria

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)
 

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