+ Reply to Thread
Results 1 to 6 of 6

Formula to count number of times the letter "X" appears in a cell in a column

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    Formula to count number of times the letter "X" appears in a cell in a column

    I've seen several discussions regarding a formula to count number of times the letter "x" appears in a "column". What if I have varying number of "X's" in a "cell", i.e. "XX" in C1, "XXX" in C2, "X" in C3, and "XXXXXX" in C4 - I want to have a total of that column that would indicate 9 "X's" in that column. Is there a formula/function for that?

    XX
    XXX
    X
    XXXXXX
    =====
    12
    Last edited by bwing; 07-05-2012 at 03:40 PM.

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

    Re: Formula to count number of times the letter "X" appears in a cell in a column

    If all you have is "X's" or blanks, then try:

    =SUMPRODUCT(--(LEN(C1:C4)))
    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.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Formula to count number of times the letter "X" appears in a cell in a column

    Hi bwing,

    This assumes that if there's one X then they're all x's:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    07-03-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Formula to count number of times the letter "X" appears in a cell in a column

    The "SUMPRODUCT(--(LEN(C1:C4))) suggestion did exactly what I wanted - thanks.
    Last edited by bwing; 07-05-2012 at 04:03 PM.

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

    Re: Formula to count number of times the letter "X" appears in a cell in a column

    They are two different outcomes... which was the one that worked for you?

  6. #6
    Registered User
    Join Date
    07-03-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Formula to count number of times the letter "X" appears in a cell in a column

    The "SUMPRODUCT(--(LEN(C1:C4))) suggestion did exactly what I wanted - thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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