+ Reply to Thread
Results 1 to 11 of 11

ABS returning a 0 from a negative 2

  1. #1
    Registered User
    Join Date
    05-17-2016
    Location
    Florida USA
    MS-Off Ver
    2016
    Posts
    3

    ABS returning a 0 from a negative 2

    What should be a simple formula is just not working and I don't know why.

    cell b321 contains a sum formula resulting in -2. I used =abs(b321) and it resulted in a zero. Can anyone explain why this is not working?

  2. #2
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    MA, USA
    MS-Off Ver
    365(PC) V:2412
    Posts
    1,477

    Re: ABS returning a 0 from a negative 2

    any chance you can upload this worksheet. I can't get this error to duplicate on my own

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: ABS returning a 0 from a negative 2

    Try
    =ABS(B321+0)

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: ABS returning a 0 from a negative 2

    @ Jose,

    If the cell contains a function, then it's probably not outputting as text. I say probably because it could have a TEXT() wrapper or concatenation or something -- but that's relatively unlikely.

    Even if it was stored text though, ABS will force a number stored as a text string to evaluate as a number.

    @ msbeaudry,
    What kind of formatting is applied to the cell?
    Are there other functions wrapping, or have you simplified what's going on?

    As dosydos said, it's very difficult to diagnose strange behavior based only on a description, without seeing the worksheet.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: ABS returning a 0 from a negative 2

    Quote Originally Posted by ben_hensel View Post
    @ Jose,
    ...
    Even if it was stored text though, ABS will force a number stored as a text string to evaluate as a number. ...
    You have absolutely right. The ABS function always returns a number (unless there is an error) which may be the case.
    A cell with the value =CHR(255)&"- 2" is shown as -2. The ABS function will produce error that can be shown as zero.
    I am very curious to see what kind of error. I will be waiting ...

  6. #6
    Registered User
    Join Date
    05-17-2016
    Location
    Florida USA
    MS-Off Ver
    2016
    Posts
    3

    Re: ABS returning a 0 from a negative 2

    This is the set of formulas relating to the error. I can not attach the full spreadsheet as it is 27MB.
    I tried formatting the cells as numbers and as general.


    =B303+B278+B247+B206+B172+B141+B110+B78+B29
    =AVERAGE(B285,B264,B262,B253,B222,B224,B213,B190,B188,B179,B158,B156,B147,B127,B125,B116,B96,B94,B85,B64,B62,B53,B11)
    =B307-B308

    =ABS(B312)

    =B27+B45
    0
    =ABS(SUM(B316-B320))

    =SUM(B317:B319)
    =B320-B316
    =B318*40
    =B319*40
    =B322+B323
    =IF(B321<0,"short","")

    =B76
    2


    =SUM(B328:B330)
    =B331-B327
    =B329*40
    =B330*40
    =B333+B334


    =B316+B327
    =B320+B331
    =B339-B338
    =B339*40


    =B170
    3.5

    =SUMIF(B352,)
    Last edited by msbeaudry; 05-18-2016 at 08:49 AM.

  7. #7
    Registered User
    Join Date
    05-17-2016
    Location
    Florida USA
    MS-Off Ver
    2016
    Posts
    3

    Re: ABS returning a 0 from a negative 2

    =ABS(B321+0) did not work

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,418

    Re: ABS returning a 0 from a negative 2

    It can be difficult to diagnose this sort of thing from a list of functions. I would suggest that you spend some time with your formulas to build a good sample spreadsheet that illustrates your problem.

    I tried pasting those formulas into a blank spreadsheet, but I could not replicate the problem you describe. I do not know if it is because I pasted them into the wrong block of cells or if I have otherwise misunderstood. I started by assuming that the =B320-B316 formula belongs in B321, counted up from there to guess that the first formula belongs in B310. Then pasted the block of formulas into B310. I made up some numbers for B310:B312 to see what was happening with B321. I then added an ABS() function in C321, and it seems to work just fine for me.

    I would suggest that you spend some more time and create a good sample spreadsheet that will illustrate the problem you are seeing. That will give us a solid starting point for debugging.
    Attached Files Attached Files
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  9. #9
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: ABS returning a 0 from a negative 2

    Hi @MrShorty

    I analyzed your sample file and found a formula that establishes circular reference to another.
    B318: =ABS(SUM(B316-B320))
    B320: =SUM(B317:B319)

  10. #10
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,418

    Re: ABS returning a 0 from a negative 2

    @Jose

    Good catch. I frequently use circular references/iterative calculations, so I routinely have iteration enabled, so I missed that. The OP did not mention a circular reference, though a circular reference could explain what he/she is seeing. When an inadvertant or erroneous circular reference is present with iteration disabled, you can frequently get garbage results (including functions that should return non-zero values returning 0).

    Since I cannot be at all certain that I correctly pasted the formulas into the spreadsheet, my circular reference could be due to my own misunderstanding or misinterpretation of msbeaudry's description of the problem. For now, I will wait until the OP can comment and further clarify the problem, or until someone figures out the list of formulas in post #6.

  11. #11
    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

    Re: ABS returning a 0 from a negative 2

    Quote Originally Posted by msbeaudry View Post
    This is the set of formulas relating to the error. I can not attach the full spreadsheet as it is 27MB.
    Unless some of those column B cells refer to other columns we only need column B1:B352 - or whatever is the highest row number.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. data table returning negative results
    By stephme55 in forum Excel General
    Replies: 1
    Last Post: 03-30-2016, 08:04 PM
  2. [SOLVED] Selecting first negative number in a row and returning the associated column value
    By pdx-adm-trm01 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-10-2014, 12:55 PM
  3. need one formula for returning positive or negative time w/out #######
    By completelyhis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-11-2013, 09:12 AM
  4. Prevent Formula Returning Negative Result
    By Manic in forum Excel General
    Replies: 2
    Last Post: 11-09-2011, 11:27 AM
  5. Excel 2007 : Stop a SUM formula from returning negative numbers
    By chrisnmandy2004 in forum Excel General
    Replies: 2
    Last Post: 08-25-2010, 01:26 PM
  6. How to stop a cell returning a negative value
    By Sai Sari in forum Excel General
    Replies: 1
    Last Post: 08-05-2010, 01:25 AM
  7. Excel Function returning negative 0
    By ibertram in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2005, 10:40 AM

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