+ Reply to Thread
Results 1 to 6 of 6

Text Function

  1. #1
    Registered User
    Join Date
    03-04-2015
    Location
    new york
    MS-Off Ver
    2013
    Posts
    3

    Text Function

    I need to figure out a formula that will count how many different letters appear in a cell. I have a cell that has a quote it, though it is programmed to change quotes every time the page resets so I cannot enter an exact word to search. I have tried search functions mixed with trims and lengths, I just cannot figure out something that works.

  2. #2
    Registered User
    Join Date
    02-25-2014
    Location
    Brisbane
    MS-Off Ver
    Excel 2000
    Posts
    78

    Re: Text Function

    Try =LEN(SUBSTITUTE(A1," ",""))

    Obviously replace the A1 with the cell you are counting

  3. #3
    Registered User
    Join Date
    03-04-2015
    Location
    new york
    MS-Off Ver
    2013
    Posts
    3

    Re: Text Function

    Yes I tried that one before, it gives the total number of letters in the cell.
    For example:
    I go to the store

    My answer would need to be 8 because there are 8 different letters in that sentence, as opposed to 13 total letters.

  4. #4
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Text Function

    Hello, try this :
    In A1 : your string
    in B1 : =LEN(A1)
    in C1 : =IF(LEN(A1)=LEN(SUBSTITUTE(A1, " ","")),0,1)
    in D1 : =SUM(IF(FREQUENCY(MATCH(MID(SUBSTITUTE(A1," ", ""), ROW(INDIRECT("1:" & B1)),1),MID(SUBSTITUTE(A1, " ", ""), ROW(INDIRECT("1:"&B1)),1),0),ROW(INDIRECT("1:"&B1)))>=1,1,0))-C1 as an array formula, ie validate using CTRL+SHIFT+ENTER
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Text Function

    I just answered a similar question a few minutes ago:

    https://www.excelforum.com/showthread.php?t=1077675
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Text Function

    Try this one

    =SUM(COUNTIF(A1,"*"&{"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}&"*"))

    it will count unique letters only

    Row\Col
    A
    B
    1
    I go to the store
    8
    2
    Yes I tried that one before
    13
    3
    I just cannot figure out something that works
    17
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. Replies: 1
    Last Post: 04-24-2014, 12:25 AM
  2. InStr function doesn't find specific text, but finds any text in column and runs code
    By mikey3580 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-27-2014, 03:50 AM
  3. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  4. Replies: 4
    Last Post: 07-25-2013, 05:28 AM
  5. Replies: 3
    Last Post: 10-27-2010, 03:11 AM

Tags for this Thread

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