Counting characters in a cell

L

Laura Henderson

I need to count how many times 1 cell has letter a, b, c, d, and so on. Is
there any way to do this without using multiple cells? Also, is there a way
to name each total? For example, a = Monthly Total of A. Thanks!
 
D

Duke Carey

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

if you want a label for it

="Monthly Total of a = " & LEN(A1)-LEN(SUBSTITUTE(A1,"a",""))
 
L

Laura Henderson

Thanks for the response. I'm still getting 0 even after I put a b a b in A1.
Should I be seperating the characters with anything? I tried a comma but
still get 0. My formula is in B1.
 
D

Duke Carey

The last part of the formula is two single quotes with nothing in between.
The intent is to replace the a's with nothing. The whole formula counts the
# of characters in the cell and subtracts the the # of characters when the
a's are eliminated

Is that what you have?
 
L

Laura Henderson

ahhh i see. i did not have that. i assumed i put in my other characters after
a. so this formula just counts how many characters total besides "a's"? is
there any way we can put something on there that counts total number of a,
total number of b, total number of c? am i just misunderstanding the formula?
 
L

Laura Henderson

woops! i got it! nevermind! thanks!

Duke Carey said:
The last part of the formula is two single quotes with nothing in between.
The intent is to replace the a's with nothing. The whole formula counts the
# of characters in the cell and subtracts the the # of characters when the
a's are eliminated

Is that what you have?
 

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