+ Reply to Thread
Results 1 to 2 of 2

Problems with ABS() function

  1. #1
    Registered User
    Join Date
    12-07-2004
    Location
    Leeds, UK
    Posts
    2

    Problems with ABS() function

    Got a bit of a strange problem -
    I have two cells each containing a different formula, but both of which result in an identical answer (checked to 30 d.p.). When I subtract one from the other the answer is (as expected) zero. However, when i take the absolute value of the difference, the value is NOT zero. The answer I get is 1.14E-13.

    Its just a small value but enough to totally screw my s/sheet up as i'm just performing a logic check on the cell - does it equal 0?

    Can anyone help me out here? A solution? or an explanation at to how the ABS() function works.

    Thanks in advance

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    I guess that the cells are simply formatted to 30 d.p rather than rounded to 30.

    The reason is that the two cells, even at 30 d.p. are not exactly the same. There is an extremely small residual difference. The way round is to wrap the formulae with a ROUND() function.

    e.g.

    =ROUND(ABS(cell1)-ABS(cell2),30)

    or round the cells themselves first. =ROUND(cell1,30)

    HTH

+ 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