Counting the number of letters in a cell

B

beefycj5

Can Excel count the numbers of letters in a cell that has mixed letters
and numbers? Can you restrict =LEN to only letters (or only numbers)?

IE - ABC123
# of letters = 3

Thanks,
Adam
 
M

MartinShort

Are they always in the same format Adam? ie 3 letters, 3 numbers. I
they are try a combination of the LEFT and LEN functions.

ie *=LEN(LEFT(A1))* etc.

If the pattern is irregular, yes you can do it, but you would need t
write a small macro. To help you, we would also need more precis
rules. ie What would you want to extract if the cell containe
A23BGF44?

Marti
 
R

Ron Coderre

See if this works for you:

=LEN(A1)-SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,{0,1,2,3,4,5,6,7,8,9},"")))

It should accommodate any combination of text and numbers.

Regards,
Ron
 
Top