+ Reply to Thread
Results 1 to 8 of 8

Count cells not containing specific text

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    9

    Count cells not containing specific text

    Hi All

    I have two questions

    1 How do I count the number of cells that do not contain specific text

    In my "sports club" column in the attached document, there are the names of various sports clubs of which some of my clients are members. If they are not a member of a sports club I have simply entered "No". I would like to be able to enter a formula which allows me to count the number of people who are members of sports clubs. I was thinking that the best way of doing this was to count the number of cells that do not contain the word "No". Would I be right in thinking this or is there a better way? Also data will be continually added to this document so I would like to do this without having to alter the formula each time I do so?

    2 I would like to find out which sports are mainly played by and preferred by all the females surveyed. I would like to be able to find all of the sports played by females and how many times each sport was chosen by a female. I could do this by searching through the document as it is, as there is currently not a lot of data to work with, but as mentioned earlier, more data will be added so it would be useful if excel could find this information for me.

    Thank you in advance for helping me with these questions.
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Count cells not containing specific text

    For the first question, Try

    =COUNTIFS(E:E,"<>No",E:E,"<>")-1

    The -1 is to account for the header E3.

  3. #3
    Registered User
    Join Date
    05-24-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Count cells not containing specific text

    Please award yourself one round of applause on my behalf. This worked great thank you. I have no idea why though. is it possible that you could explain this formula in slightly more detail if possible. Thank you again.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Count cells not containing specific text

    The <> basically means "Not Equal To"
    So counif is counting each cell in column E that is Not Equal to No and Not blank

    There's two parts in it really
    E:E,"<>No" <- this counts NOT Equal to No
    and
    E:E,"<>" <- this counts NOT Equal To Nothing....Not Blank

    Hope that helps.

  5. #5
    Registered User
    Join Date
    05-24-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Count cells not containing specific text

    Yes, That is fantastic. Thank you very much.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Count cells not containing specific text

    another variation (with less work for you down the road) is to not put the "no" in that column, just leave it blank. You can then use the =countblank() function...although you may need to edit that later...
    =COUNTBLANK(E4:E32)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    05-24-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Count cells not containing specific text

    I did do this initially but, I'm doing this for somebody at work who is technologically impaired and can just about enter the data. I don't think his brain could handle editing the formula each time he added data.

    Thank you anyway.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Count cells not containing specific text

    I totally understand, thats why I added the "although you may need to edit that later..." part

    Thanks for the feedback

+ 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