+ Reply to Thread
Results 1 to 4 of 4

Formula doesn't give same results when surrounded by brackets

  1. #1
    Registered User
    Join Date
    12-16-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Formula doesn't give same results when surrounded by brackets

    I have a formula that is simply the following:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The result of the formula = 0


    However, if I then change that formula to surround it with brackets, so it is like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The answer ends up being 0.0000000000582076609134674

    I get the same behaviour if that formula is nested in another formula, for example:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Why does adding brackets around the formula creating a (slightly) different result?

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Formula doesn't give same results when surrounded by brackets

    What are you trying to do with SUM(B1,Z1)? Are you just adding two cells, B1 + Z1, or are you trying to add the whole range from B1 through Z1?
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    12-16-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Formula doesn't give same results when surrounded by brackets

    My apogies, i meant to write:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    i.e. summing A1 through to Z1

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Formula doesn't give same results when surrounded by brackets

    I can never find these knowledge base articles from Microsoft, but this is an artifact of the way Excel implements the IEEE double precision floating point arithmetic. Basically, because of the inherent limitations in computer arithmetic, sometimes A-A does not come out to exactly 0. Excel's programmers have tried to account for this, so sometimes they artificially force 0, but it is not always there. In the long run, we as programmers need to be able to accept that computer arithmetic has a built in error, and need to try to minimize that error and otherwise deal with it.

    Try this article: http://support.microsoft.com/kb/78113
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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] Routine to remove brackets around words, leaving the format intact. Doesn't always work.
    By staggers47 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-30-2013, 09:02 AM
  2. Replies: 5
    Last Post: 04-19-2012, 09:02 AM
  3. Displaying Formula Results in Brackets
    By dtm007 in forum Excel General
    Replies: 2
    Last Post: 02-02-2009, 06:13 PM
  4. Formula that will give me True or False results
    By Reenee in forum Excel General
    Replies: 2
    Last Post: 02-02-2009, 10:36 AM
  5. Brackets are negative-sum doesn't work?
    By weaver00 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-28-2008, 09:09 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