You are here:

# Excel/Counting letters in cells

Question
QUESTION: If I have cells such as A1 to A31 and have several different letters in each, such as b v c k a w b c k w and wanted lets say to get a count on just the b's in that range, what would I use as a formula?

Thanks

[an error occurred while processing this directive]---------- FOLLOW-UP ----------

QUESTION: I tried this and I received the error: ERR:508

What I'm attempting to do is type in several different letters into a single cell and later I will need to count all the B's then Count all the E's, etc. in each cell in a column. Such as B,D,E,R. Into one cell.

I'm at a total loss of what to do.

Thank you.

That's different from you first said.  Try this formula

=SUM(LEN(A11:A31)-LEN(SUBSTITUTE(A1:A31,"B","")))

DO NOT press enter to enter the formula.  If you do you will get the wrong answer.  This is an array formula.  Press CONTROL SHIFT ENTER to enter it.  After you do so the formula will look like this in the formula bar

{=SUM(LEN(A21:A28)-LEN(SUBSTITUTE(A21:A28,"a","")))}

Excel puts the french braces {} around the formula when you press CNTL SHIFT ENTER

Maybe this will help

Bill