+ Reply to Thread
Results 1 to 4 of 4

return 0 instead of a negative #

  1. #1
    Rusty
    Guest

    return 0 instead of a negative #

    I just want to do a simple sum and if the sum returns a negative number, I
    want to change it to 0.
    C6 = 38, D14 = 2, H6 = 43
    =(C6+D14)-H6

    result is -3 but I want it to show 0

  2. #2
    Elkar
    Guest

    RE: return 0 instead of a negative #

    Try this:

    =MAX((C6+D14)-H6,0)

    HTH,
    Elkar

    "Rusty" wrote:

    > I just want to do a simple sum and if the sum returns a negative number, I
    > want to change it to 0.
    > C6 = 38, D14 = 2, H6 = 43
    > =(C6+D14)-H6
    >
    > result is -3 but I want it to show 0


  3. #3
    Rusty
    Guest

    RE: return 0 instead of a negative #

    Fixed. Thanks Elkar

    "Elkar" wrote:

    > Try this:
    >
    > =MAX((C6+D14)-H6,0)
    >
    > HTH,
    > Elkar
    >
    > "Rusty" wrote:
    >
    > > I just want to do a simple sum and if the sum returns a negative number, I
    > > want to change it to 0.
    > > C6 = 38, D14 = 2, H6 = 43
    > > =(C6+D14)-H6
    > >
    > > result is -3 but I want it to show 0


  4. #4
    JE McGimpsey
    Guest

    Re: return 0 instead of a negative #

    One way:

    =MAX(C6+D14-H6,0)

    In article <[email protected]>,
    "Rusty" <[email protected]> wrote:

    > I just want to do a simple sum and if the sum returns a negative number, I
    > want to change it to 0.
    > C6 = 38, D14 = 2, H6 = 43
    > =(C6+D14)-H6
    >
    > result is -3 but I want it to show 0


+ 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