Counting letters in a cell

L

Learning Excel

My formula is =LEN(A1) and copied down.
Is there a variation of this formula to count just the letters in each cell
without counting the spaces between words ?
Thanks for the reply.
 
L

Learning Excel

Thanks a lot David Biddulph.
--
Socrates said: I only know, I don''''''''t know nothing.
I say : I don''''''''t even know, I don''''''''t
know nothing.


David Biddulph said:
=LEN(SUBSTITUTE(A1," ",""))
 
L

Learning Excel

Do you happen to have a formula to count WORDS in a cell ?
--
Socrates said: I only know, I don''''''''t know nothing.
I say : I don''''''''t even know, I don''''''''t
know nothing.


Learning Excel said:
Thanks a lot David Biddulph.
 
D

David Biddulph

Depends how you want to define words, but if you want to count spaces and
add one (unless the cell is empty), you could try:
=IF(LEN(A1)=0,0,LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1)
If you had multiple spaces in one place, that would get it confused, of
course.
 
D

Dave Peterson

Another one that will count the number of "words" separated by spaces:

=LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+(TRIM(A1)<>"")
 

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

Similar Threads


Top