+ Reply to Thread
Results 1 to 9 of 9

Please help, I can't figure out why countifs( isn't working

  1. #1
    Forum Contributor
    Join Date
    05-29-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    143

    Please help, I can't figure out why countifs( isn't working

    Hello all!

    I'm trying to break down the ranges, but for some reason I can't get the highlighted to work. I only did the highlighted for an example, but I know they're wrong bc I did a histogram... Any help would be greatly appreciated.


    Attachment 296416
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Please help, I can't figure out why countifs( isn't working

    The formula is working perfectly. Sort the data by size and highlight the data equal to or greater than 51.0 and LESS than or equal to 61.0 This is exactly 134.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Please help, I can't figure out why countifs( isn't working

    Hi Blackhawks,

    You're count seems like incorrect because there are decimals in the range. the top 69 will not count 69.123 and so on.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Please help, I can't figure out why countifs( isn't working

    I think the problem is that you have gaps and overlaps in your ranges, coupled with the fact that your numbers are not integers.

    For example, you have "<50" but then the next range is 51-69. So what happens to numbers greater than 50 but less than 51 ... there are 4 of them.

    And then you have a range 80-90, and another, 90-100. So where do you plan to count 90? There's only 1 of it, fortunately.

    You should have formulae like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for example

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Please help, I can't figure out why countifs( isn't working

    Your first row takes everything LESS than 50

    Your second row takes everthing BETWEEN 51 and 69

    You are missing everything BETWEEN 50 and 51... (eg. 50.41667, 50.5618, 50.63291... etc.)
    Attached Files Attached Files

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Please help, I can't figure out why countifs( isn't working

    =COUNTIFS(B$6:B$656,"<=50") 23
    =COUNTIFS(B$6:B$656,">50",B$6:B$656,"<70") 157
    =COUNTIFS(B$6:B$656,">=70",B$6:B$656,"<80") 144
    =COUNTIFS(B$6:B$656,">=80",B$6:B$656,"<90") 165
    =COUNTIFS(B$6:B$656,">=90",B$6:B$656,"<=100") 162
    total = 651
    this includes all values you may have to adjust boundaries to suit
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Please help, I can't figure out why countifs( isn't working

    D
    E
    F
    9
    < 50
    22
    =COUNTIFS(A$6:A$656,"<50")
    10
    51 - 69
    158
    =COUNTIFS(A$6:A$656,">=50",A$6:A$656,"<70")
    11
    70 - 79
    144
    =COUNTIFS(A$6:A$656,">=70",A$6:A$656,"<80")
    12
    80 - 90
    165
    =COUNTIFS(A$6:A$656,">=80",A$6:A$656,"<90")
    13
    90 - 100
    162
    =COUNTIFS(A$6:A$656,">=90",A$6:A$656,"<=100")
    14
    Total
    651

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Please help, I can't figure out why countifs( isn't working

    trouble with frequency as you seemed to have used the data is put into the next highest bin if it can match exactly
    eg data
    1
    1.1
    1.2
    1.3
    1.4
    1.5
    1.6
    1.7
    1.8
    1.9
    2
    and you use bins
    1
    2
    then the result is bin 1=1 bin 2 is 10

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Please help, I can't figure out why countifs( isn't working

    Here is your workbook and it illustrates the problems that are described above. I sorted the data in order, numbered the values as indicated in your value ranges and amended the formulae to accommodate the decimal overlaps (which is the main problem amongst others.

    Take a look and what the others have said will be amply illustrated.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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: 4
    Last Post: 02-03-2014, 08:05 AM
  2. [SOLVED] { } not working in countifs
    By Chetansuri in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-03-2014, 04:46 AM
  3. [SOLVED] Wildcard not working in my COUNTIFS
    By dtrimble in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-11-2013, 09:12 PM
  4. [SOLVED] countifs working on extended ranges and different sheets not working
    By etaf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 02:23 PM
  5. COUNTIFS not working
    By nosenga in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2011, 04:38 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