Thread: Character count
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 38
Default Character count

Thank you, Farhad,
I like its thoroughness

"Farhad" wrote in message
...
Hi,

If you are looking to count repetitions of a word (more than one
character)
for example the word "Folder" in your text string then you should change
the
Gary's formula to:

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

Thanks,
--
Farhad Hodjat


"Gary''s Student" wrote:

say a1 has the full text and a2 has the character to be counted:

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

For the data between \
use Text to Columns
--
Gary''s Student - gsnu200747


"dan" wrote:

Is there a formula that returns a count of a specified character?
For example:
Cell(A1) = I:\1stFolder\2ndFolder\3thFolder\4thFolder\5thFold er\abc.xls
Answer would be 6 for "\"

And also a formula that returns a folder name between 2 consecutive "\"