+ Reply to Thread
Results 1 to 7 of 7

Countif Function not working

  1. #1
    Registered User
    Join Date
    06-14-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Countif Function not working

    On one collumn I have <19 listed and the countif function won't count it

    I have:
    =COUNTIF(C2:C100,"<19")

    Is there any reason why this isn't working? Or any way that I can make it work?

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Countif Function not working

    Never saw that error before, but I found a solution.

    =COUNTIF(C2:C100,"*<19")

  3. #3
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Countif Function not working

    Do you want it count values less than 19 or cells explicitly containing "<19" ?
    Elegant Simplicity............. Not Always

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

    Re: Countif Function not working

    It's because the COUNTIF function evaluates the entry <19 as meaning literally "less than 19".

    Try this experiment.

    Enter some random numbers in the range A1:A20.

    Enter <19 in cell C1.

    Then, enter this formula in cell D1:

    =COUNTIF(A1:A20,C1)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: Countif Function not working

    If you want to count the instances of the text string <19 then you can use daffodil11's suggestion or this one:

    =SUMPRODUCT(--(A1:A20="<19"))

  6. #6
    Registered User
    Join Date
    06-14-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Countif Function not working

    Perfect! Daffodil11 that worked and was exactly what I needed! Awesome!

  7. #7
    Registered User
    Join Date
    06-14-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Countif Function not working

    Thanks everyone for answering!

+ 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. Countif function not working at all on Mac
    By galaxytraveler42 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-08-2014, 05:31 PM
  2. [SOLVED] COUNTIF function not working
    By RoyLittle0 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 06-29-2013, 08:14 AM
  3. COUNTIF array function not working
    By Excellentafrican in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-25-2013, 03:53 AM
  4. Excel 2007 : Countif function Not working correctly
    By carl.spackler in forum Excel General
    Replies: 12
    Last Post: 04-09-2012, 06:39 PM
  5. Countif with nested function not working?
    By jshuatree in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-17-2006, 05:55 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