+ Reply to Thread
Results 1 to 9 of 9

count number of times the letter "a" appears in a cell

  1. #1
    Registered User
    Join Date
    05-30-2014
    Posts
    2

    count number of times the letter "a" appears in a cell

    hi , i have this in my 1 cell: ttgtcctacttacaacactgtgcttagtaatggttattgcgactttatccttgttctgaa
    i want to count how many "a" in this cell . which formula i can use to solve this problem ?
    thanks

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: count number of times the letter "a" appears in a cell

    =LEN(A1)-LEN(SUBSTITUTE(A1,"a",""))
    where your string is in A1
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: count number of times the letter "a" appears in a cell

    Hi, in your case (a single character) this will work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    However, most people would want to ssearch for more than one character, in which case this is needed:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    which counts the number of "tt" in the string.

    Does this provide you withthe answer?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    05-30-2014
    Posts
    2

    Re: count number of times the letter "a" appears in a cell

    It works !!!!! thank you so much

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: count number of times the letter "a" appears in a cell

    just to add another option for case sensitivity issue
    e.g. AAAAaaaaAAAaaaa

    =LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"A",""))
    or change to Lower() then "a"
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: count number of times the letter "a" appears in a cell

    There you go, 3 answers for the price of 1!

    Can you now mark the thread as closed, and say "thanks" to those who helped by clicking teh Add Reputation button at the bottom left of their posts.

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

    Re: count number of times the letter "a" appears in a cell

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: count number of times the letter "a" appears in a cell

    OMG, Tony. I was once a PhD Biochemist & I didn't notice the pattern. Time I was put out to stud. If only...

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: count number of times the letter "a" appears in a cell

    You could also use a cell reference for the letter that you want to get a count of. The letter to be counted is in M1:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. [SOLVED] Want to count the number of times a particular letter appears within a range
    By dwhite30518 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-11-2013, 01:24 PM
  2. Replies: 5
    Last Post: 07-05-2012, 04:04 PM
  3. Replies: 8
    Last Post: 07-05-2012, 03:07 PM
  4. Replies: 3
    Last Post: 09-29-2009, 06:42 PM
  5. [SOLVED] How can I count the # of times the word "Yes" appears in a range
    By Meri in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2006, 05:45 PM

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