Counting the number of letters in a cell

  • Thread starter Thread starter beefycj5
  • Start date Start date
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
 
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
 
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
 

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

Back
Top