+ Reply to Thread
Results 1 to 7 of 7

LEN function to count just letter characters

  1. #1
    Registered User
    Join Date
    10-28-2021
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Microsoft Office 2013
    Posts
    1

    LEN function to count just letter characters

    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!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,418

    Re: LEN function to count just letter characters

    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.

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    639

    Re: LEN function to count just letter characters

    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).

  4. #4
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: LEN function to count just letter characters

    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 *

  5. #5
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: LEN function to count just letter characters

    You can use
    Formula: copy to clipboard
    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.

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    6,014

    Re: LEN function to count just letter characters

    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"))

  7. #7
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,414

    Re: LEN function to count just letter characters

    One UDF for alphabetics and numerics

    Please Login or Register  to view this content.
    =jec(A1,0) for letters
    =jec(A1,1) for numbers
    Last edited by JEC.; 10-30-2021 at 04:54 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with the kind of function and syntaxis
    By wolfje in forum Excel General
    Replies: 7
    Last Post: 04-22-2018, 09:42 AM
  2. Looking for some kind of INDEX function?
    By rbhed77089 in forum Excel General
    Replies: 5
    Last Post: 06-29-2017, 10:17 AM
  3. [SOLVED] Need to know what kind of function to use
    By misspen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2014, 11:47 PM
  4. Simple Index Function.. kind of
    By kdenhof in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-09-2014, 11:35 AM
  5. Creating Date specific formula for date ranges inputted into separate cells
    By Lewis333 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-02-2013, 07:59 AM
  6. [SOLVED] Using Vlookup kind of function in Macro
    By Varun13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-27-2013, 10:32 AM
  7. [SOLVED] data validation-What kind of function should I use?
    By yalanola in forum Excel General
    Replies: 1
    Last Post: 07-26-2006, 04:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1