+ Reply to Thread
Results 1 to 12 of 12

Countif formula to count cells that contain everything but a certain text

  1. #1
    Registered User
    Join Date
    06-02-2014
    Location
    Ontario, Canada
    Posts
    37

    Countif formula to count cells that contain everything but a certain text

    Hey guys,

    I have been looking for a way to count the number of cells in a column that do not contain the word "No." I used the countif formula to count the cells that do contain "No" but I need a formula to count cells that contain anything but the word no.

    Let me know if this is possible!

    Thanks again Excel Forum!

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

    Re: Countif formula to count cells that contain everything but a certain text

    It will be the same as countif you've done before for cells that DO contain No.
    But instead of "No", use "<>No"

  3. #3
    Registered User
    Join Date
    06-02-2014
    Location
    Ontario, Canada
    Posts
    37

    Re: Countif formula to count cells that contain everything but a certain text

    Quote Originally Posted by Jonmo1 View Post
    It will be the same as countif you've done before for cells that DO contain No.
    But instead of "No", use "<>No"
    That seems like a feasible solution except that I have selected a huge range of cells that I want to be updated as I enter in new information. I have 12 cells that have been counted as No and 383 that have been counted as everything but no haha. In reality it is 10 cells that do not contain No. So is there a way for it to only count text?

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

    Re: Countif formula to count cells that contain everything but a certain text

    ok, so there's a bunch of blanks in the range?

    If you already have a countif that counts how many DO have no, then you can do
    =COUNTA(range)-A1
    Assuming A1 is the cell you already have your countif(range,"no") formula

    Basically counts how many cells have any value, then subtracts the result of your original countif of no's.

  5. #5
    Registered User
    Join Date
    06-02-2014
    Location
    Ontario, Canada
    Posts
    37

    Re: Countif formula to count cells that contain everything but a certain text

    Quote Originally Posted by Jonmo1 View Post
    ok, so there's a bunch of blanks in the range?

    If you already have a countif that counts how many DO have no, then you can do
    =COUNTA(range)-A1
    Assuming A1 is the cell you already have your countif(range,"no") formula

    Basically counts how many cells have any value, then subtracts the result of your original countif of no's.
    Not sure why, but it is returning only 1.

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

    Re: Countif formula to count cells that contain everything but a certain text

    Can you post a sample book?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Countif formula to count cells that contain everything but a certain text

    Another way is to have a helper column to determine what is in the cells and then count them.
    ie
    column A are your values
    Column B =IF(A1>"",IFERROR(IF(SEARCH("No",A1,1)>0,0,1),1),"") this will see if the cell contains the word no or No or NO
    Column C =IF(A1>"",IFERROR(IF(FIND("No",A1,1)>0,0),1),"") this will see if the cell contains the word No only - Case sensitive

    copy these formulas down the columns.
    then you can just do a sum of the columns to count how many values contain the word no depending on Case.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  8. #8
    Registered User
    Join Date
    06-02-2014
    Location
    Ontario, Canada
    Posts
    37

    Re: Countif formula to count cells that contain everything but a certain text

    Sample.xlsx

    Here you are.

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

    Re: Countif formula to count cells that contain everything but a certain text

    Misplaced ) in G6

    =COUNTA(B4:B25-E6)
    should be
    =COUNTA(B4:B25)-E6

  10. #10
    Registered User
    Join Date
    06-02-2014
    Location
    Ontario, Canada
    Posts
    37

    Re: Countif formula to count cells that contain everything but a certain text

    Quote Originally Posted by Jonmo1 View Post
    Misplaced ) in G6

    =COUNTA(B4:B25-E6)
    should be
    =COUNTA(B4:B25)-E6
    Ah, there it is! My mistake. Thanks for your help!

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

    Re: Countif formula to count cells that contain everything but a certain text

    You're welcome.

  12. #12
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Countif formula to count cells that contain everything but a certain text

    if you change E6 to =COUNTIF(B4:B25, "No*")
    then it will deal with the value No,completed

+ 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: 3
    Last Post: 05-13-2014, 10:48 PM
  2. [SOLVED] Formula needed to only count total cells entered and not count adjacent text entered cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-07-2013, 06:22 PM
  3. [SOLVED] Using COUNTIF to count text derived by formula
    By DWG3 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-20-2013, 10:12 PM
  4. [SOLVED] count cells that contain text but do not count cells containing only a formula
    By cprpacific in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-13-2013, 03:15 PM
  5. Replies: 8
    Last Post: 10-05-2012, 03:44 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