+ Reply to Thread
Results 1 to 8 of 8

My formula gives the wrong answer.

  1. #1
    Registered User
    Join Date
    06-19-2019
    Location
    St. Louis, Missouri
    MS-Off Ver
    365
    Posts
    1

    My formula gives the wrong answer.

    If I calculate combin(25, 10) in a cell I get the right answer, which is 3,268,760, and if I type that number directly into the isodd function, I get the right answer as well. So why is it that when I put isodd(combin(25, 10)) into a cell, I get the wrong answer?

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365, rarely 2007
    Posts
    12,625

    Re: My formula gives the wrong answer.

    MCweb welcome to the forum.

    Good question. I get the same, and I have never encountered this before.

    I'll pass this on to the community.
    Dave

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    14,235

    Re: My formula gives the wrong answer.

    Is it a bug in Excel? I don't have Excel to test on here, but I note that both LibreOffice Calc and Gnumeric return FALSE for this particular example.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365, rarely 2007
    Posts
    12,625

    Re: My formula gives the wrong answer.

    I just tried

    =MOD(COMBIN(25,10),1)

    It returns 0.999999999534338

    So does

    =MOD(FACT(25)/FACT(15)/FACT(10),1)

    Appears to be a floating point issue.
    Last edited by FlameRetired; 06-19-2019 at 06:48 PM.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365, rarely 2007
    Posts
    12,625

    Re: My formula gives the wrong answer.

    A quick search of the net (search string, "Excel COMBIN function floating point") turned these up. Apparently you are not alone.

    https://www.excelbanter.com/excel-wo...-integers.html

    https://www.excelbanter.com/excel-wo...ntegers-2.html

    https://www.excelforum.com/excel-for...bug-print.html

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365, rarely 2007
    Posts
    12,625

    Re: My formula gives the wrong answer.

    Quote Originally Posted by MrShorty View Post
    Is it a bug in Excel? I don't have Excel to test on here, but I note that both LibreOffice Calc and Gnumeric return FALSE for this particular example.
    My search found in LibreOffice this is not a bug.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,580

    Re: My formula gives the wrong answer.

    So to get rid of it, you'd need
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux - O365
    Posts
    12,509

    Re: My formula gives the wrong answer.

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

+ 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] Formula gives 'wrong' answer.
    By horne in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-03-2014, 01:23 PM
  2. [SOLVED] IF Formula returning wrong answer
    By Abyrose in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-01-2014, 11:30 PM
  3. Why would this formula produce this wrong answer
    By Miskondukt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2014, 03:11 PM
  4. Formula Dragging, Wrong Answer
    By pbateman56 in forum Excel General
    Replies: 1
    Last Post: 04-16-2012, 04:56 PM
  5. [SOLVED] Fill down produces correct formula but wrong answer
    By Jim at SDSU in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2006, 03:10 PM
  6. Formula correct, answer wrong
    By TJAC in forum Excel General
    Replies: 2
    Last Post: 01-03-2006, 02:20 PM
  7. Wrong answer after using the payment formula in excel
    By punkyh in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 04-28-2005, 03:06 PM

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