The LEN functions counts letters, numbers, characters and all spaces, but is there a function that counts just letters? I can't find it.
The LEN functions counts letters, numbers, characters and all spaces, but is there a function that counts just letters? I can't find it.
Last edited by AliGW; 10-28-2021 at 07:18 AM. Reason: Title changed - please think more carefully about your thread titles in future!
No, there is no such function, but it can be simulated.
There are instructions at the top of the page explaining how to attach your sample workbook.
A good sample workbook has just 10-20 rows of representative data. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
Administrative Note:
Welcome to the forum.
We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.
Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).
Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.
(Note: this change is not optional. As you are new, I have done it for you today.)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
You can use the CHAR/CODE functions and the fact that the alphabet has the values 65-90 (capital letters) and 97-122 (small letters).
Hi,
if there is no solution in formulas then maybe go for a User Defined Formula
Put this code in a module and use the UDF_CountNumerics or UDF_CountAlphabetics functions to get the count you want
![]()
Please Login or Register to view this content.
Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
If you have been helped, maybe you could click the *
You can use
Formula:
Please Login or Register to view this content.
however the set {0;65;91;97;123} could be bigger in the case of use Cyrillic letters and for unicode letters the formula must changed.
Another way:
COUNT(SEARCH(MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1))),1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
Enter with Ctrl+Shift+Enter.
or (365):
=COUNT(SEARCH(MID(A1,SEQUENCE(LEN(A1)),1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
One UDF for alphabetics and numerics
=jec(A1,0) for letters![]()
Please Login or Register to view this content.
=jec(A1,1) for numbers
Last edited by JEC.; 10-30-2021 at 04:54 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks