+ Reply to Thread
Results 1 to 5 of 5

Countif formula giving strange outcome

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    Tilburg
    MS-Off Ver
    Excel 2010
    Posts
    11

    Countif formula giving strange outcome

    Hello,

    can anyone explain to me how the next thing is possible? I have a countif formula, which compares a cell with itself, with a "smaller or equal to" criterium.
    Normally this should always result in the outcome 1. However in two cases the outcome in excel is 0. I have sketched this example below:

    41557.0000150000 =COUNTIF(F15:F15,"<="&F15) 1
    41557.0000150999 =COUNTIF(F16:F16,"<="&F16) 0

    I do not know how this is possible. Maybe to much decimals? I hope someone can give me some explanation!

  2. #2
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Countif formula giving strange outcome

    Hi BAVE,
    I'm also curious with that.Can you attach a sample worksheet with this 2 formula you did.Thanks
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

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

    Re: Countif formula giving strange outcome

    its must be a rounding issue and floating decimals? where did the 41557.0000150999 come from?
    "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

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    Tilburg
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Countif formula giving strange outcome

    I also thought it should be something with floating decimals, since the formula is gathered form a date (using value(04/10/2014) and adding the row divided by 1000000. This should therefore be 41557 + 0.0000151 instead of the 41557 + 0.0000150999 that is given now.

    However, when I try to round this value by adding a round function with 7 decimals, I still get a number with 10 decimals endig with 999. How can I solve these floating decimals?

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

    Re: Countif formula giving strange outcome

    why are you adding the row divided by 10000000 is this for ranking or something?Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

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

    View Pic

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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