+ Reply to Thread
Results 1 to 5 of 5

Count the number of different characters in a range

  1. #1
    Registered User
    Join Date
    10-14-2008
    Location
    Suisse
    Posts
    8

    Count the number of different characters in a range

    Hi,

    In a column I have a list with different characters in an order I don't know.
    How can I find out how many different characters I have?
    In the attached example the result should be 3 (There are A's, B's and C's. But no D's, no E's and so on).

    Thanks for your help,
    alexandre
    Attached Files Attached Files
    Last edited by aderougemont; 01-12-2009 at 12:11 PM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    You can use the COUNTIF function

    =COUNTIF(A1:A15,"A")
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =SUMPRODUCT((A1:A15<>"")/COUNTIF(A1:A15,A1:A15&""))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    10-14-2008
    Location
    Suisse
    Posts
    8
    Thanks a lot!
    Works perfectly

    Is it possible to distinguish capital letters from small letters?
    Last edited by aderougemont; 01-12-2009 at 09:48 AM.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by aderougemont View Post

    Is it possible to distinguish capital letters from small letters?
    Try:

    Please Login or Register  to view this content.
    This is an array formula and must be confirmed with CTRL+SHIFT+ENTER not just ENTER.. you will see { } brackets appear around the formula..

    P.S.

    Next time you should add a new post to the thread instead of editing it, especially after the original question was solved... we don't always look back at solved threads...and you may think you are being ignored... or post a new thread with a new question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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