+ Reply to Thread
Results 1 to 6 of 6

Countifs - How to exclude data

  1. #1
    Registered User
    Join Date
    09-29-2016
    Location
    London, england
    MS-Off Ver
    2010
    Posts
    2

    Countifs - How to exclude data

    Hi

    I am very new to Countifs and am having trouble finding the right formula for the following:

    I have a column that contains various cells with a mixture of J9C,J9X,J9L etc etc. I want to count every cell that does not contain J9X.
    I have tried "<>J9X", but it is bringing back the same count as all cells, so is not removing J9X cells.

    Please could someone advise what I am doing wrong and how to do it right?

    Thanks

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

    Re: Countifs - How to exclude data

    "<>J9X" is the correct syntax for a criteria in countifs

    I would guess that your cells probably have leading or trailing spaces in them, so they are like " J9X" or "J9X " or " J9X "

    Can you attach a sample book ?

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: Countifs - How to exclude data

    Try this ...

    "<>*J9X*")

  4. #4
    Registered User
    Join Date
    09-29-2016
    Location
    London, england
    MS-Off Ver
    2010
    Posts
    2

    Re: Countifs - How to exclude data

    Thank you so much guys.

    Just tried your suggestion Phuocam and it works!!

    You have saved me a lot of pain :-)

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: Countifs - How to exclude data

    You are welcome.

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

    Re: Countifs - How to exclude data

    That just confirms the problem is that your cells contain extra characters.

    I wouldn't advise to just leave it at that, and use the wildcards in the countifs functions.
    You'd be better off in the long run cleaning up the source data and remove those extra characters.

    Try using the TRIM function on that column to remove the extra spaces.

+ 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] Using Countifs that can exclude 0 values
    By Ex-xcel in forum Excel General
    Replies: 5
    Last Post: 09-28-2016, 01:59 PM
  2. [SOLVED] COUNTIFS forumulas that can exclude criteria in a range
    By jholiday78 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-05-2015, 12:00 PM
  3. Exclude blank cells from COUNTIFS formula
    By Leahsco in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-05-2014, 11:45 AM
  4. Replies: 5
    Last Post: 05-04-2014, 10:56 AM
  5. [SOLVED] =sum(countifs(range,{not this, not this, nor this} -How to exclude criteria in this manner
    By nscarritt in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-26-2014, 04:00 PM
  6. [SOLVED] How do I exclude a value using COUNTIFS function for multiple columns
    By kyknifeman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-10-2014, 07:16 AM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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