ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting characters in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/202701-counting-characters-cell.html)

Laura Henderson

Counting characters in a cell
 
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!

Duke Carey

Counting characters in a cell
 
=LEN(A1)-LEN(SUBSTITUTE(A1,"a",""))

if you want a label for it

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

"Laura Henderson" wrote:

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!


Laura Henderson[_2_]

Counting characters in a cell
 
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.

"Duke Carey" wrote:

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

if you want a label for it

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

"Laura Henderson" wrote:

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!


Duke Carey

Counting characters in a cell
 
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?

"Laura Henderson" wrote:

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.

"Duke Carey" wrote:

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

if you want a label for it

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

"Laura Henderson" wrote:

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!


Laura Henderson[_2_]

Counting characters in a cell
 
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?

"Duke Carey" wrote:

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?

"Laura Henderson" wrote:

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.

"Duke Carey" wrote:

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

if you want a label for it

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

"Laura Henderson" wrote:

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!


Laura Henderson[_2_]

Counting characters in a cell
 
woops! i got it! nevermind! thanks!

"Duke Carey" wrote:

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?

"Laura Henderson" wrote:

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.

"Duke Carey" wrote:

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

if you want a label for it

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

"Laura Henderson" wrote:

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!



All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com