+ Reply to Thread
Results 1 to 13 of 13

Excel 2007 : Countif function Not working correctly

  1. #1
    Registered User
    Join Date
    03-31-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Countif function Not working correctly

    Hello
    I'm really glad I found this forum thanks in advance for any assistance as I am an excel Junkie and spend countless hours using it. My dilemma is this:
    I am trying to use the countif function for numbers that are not whole and derived from a formula. Ive found that it works if I just type the value in it will be counted but when a formula calculates it it is not counted. I am sure it is a formatting issue but it has eluded me. IE None of the below numbers are counted using =Countif(A1:A10,"2.962496068") - thanks in advance for any help.

    1.44224957
    1.709975947
    -3
    2.962496068
    -1.912931183
    -2.223980091
    1.587401052
    2.15443469
    1.709975947

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Countif function Not working correctly

    Try without quotes around number

  3. #3
    Registered User
    Join Date
    03-31-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Countif function Not working correctly

    no that didnt help

  4. #4
    Registered User
    Join Date
    03-31-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Countif function Not working correctly

    I probably should mention that when I highlight the cell the formula that is in there is =R21^(1/3) which shows up in the formula bar

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Countif function Not working correctly

    How about:

    =SUMPRODUCT(--(LEFT(A1:A10,11)="2.962496068"))

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Countif function Not working correctly

    Wouldn't that omit values that were rounded up to the target value?

    eg: 2.962496067{5,6,7,8,9} would not be found

    I haven't tried it, just wondering.

    It might need something like:

    =COUNTIFS(A:A,">=2.9624960675",A:A,"<=2.9624960684")
    Last edited by Cutter; 03-31-2012 at 02:59 PM.

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Countif function Not working correctly

    I assume he can't count them because they are actually different lenght...

    2^(1/3) is 1,25992104989487 so counting 1,259921 will give you 0

    example workbook would be the best.

    Edit: he, not you

  8. #8
    Registered User
    Join Date
    03-31-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Countif function Not working correctly

    Hi Zbor - none of those suggestions worked. I also heard countif doesn't work with negative #'s - have you heard this? Also how do you submit a sample workbook?
    thanks

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Countif function Not working correctly

    In a post click Go Advanced, click Paper clip icon and then upload file.

    Write your input and desired result.

  10. #10
    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
    52,939

    Re: Countif function Not working correctly

    maybe if, IN your countif, you include the formula that gives you the number you are looking for? that way, irrispective of your "answer" length/format, it should fid it?
    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

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Countif function Not working correctly

    I envisioned OP's need was to count a value without necessarily knowing the formula that created it.

    Maybe this solves the rounding issue?
    =SUMPRODUCT(--(ROUND(A1:A10,9)=2.962496068))
    Last edited by Cutter; 03-31-2012 at 06:01 PM.

  12. #12
    Registered User
    Join Date
    03-31-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Countif function Not working correctly

    ill try that thx!@

  13. #13
    Registered User
    Join Date
    03-31-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Countif function Not working correctly

    FDibbins
    How would you formula that?
    =countif(a1-a20),=2^(1/3)? Something like that ?
    thanks

+ 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