Count the number of characters created by string text

M

mrlanier

Is there a formula that will count the number of characters, and spaces
between characters, in a short paragraph created by a string text? It
is acceptible if spaces cannot be counted. Thanks.

Michael
 
J

Jason Lepack

You have to give an example, becuase your description is very cryptic.

Show a sample string of text, illustrate the characters that ou want
the space between, and the expected result.

Cheers,
Jason Lepack
 
J

JE McGimpsey

One way:

=LEN(A1)

will count all the characters in cell A1.

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

will count all the non-space characters in A1
 
M

mrlanier

For example, if cell A1="Dogs bark in the night." and B1="But cats are
quiet.", and if I wanted the two to string I would use the formula:

=A1&" "&A2

This would give the the short paragraph: Dogs bark in the night. But
cats are quiet. What I need to do is count the characters in the
statement, along with spaces if possible. In this case, there are 34
characters and 9 spaces if 2 are counted between the sentences. I'm
hoping to find a formula that will do the count automatically. Thanks.

Michael
 
J

JE McGimpsey

One way:

Assume the concatenation is in C1:

="There are " & LEN(SUBSTITUTE(C1," ","")) & " characters and " &
LEN(C1)-LEN(SUBSTITUTE(C1," ","")) & " spaces."
 

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