+ Reply to Thread
Results 1 to 5 of 5

cell to show ' 0 ' , or nothing at all, if the sum is a negative number

  1. #1
    Registered User
    Join Date
    09-17-2005
    Posts
    2

    cell to show ' 0 ' , or nothing at all, if the sum is a negative number

    I'm making a worksheet for my company. I want to subtract one number number from another number. I use the 'sum' format for this '=sum(BL4-BP4) '. This format works fine for me in most cases, if BL4 >BP4. However, if BL4<BP4, the sum that is shown is a negative number. I would like for the worksheet to show only positive numbers. I would like for the cell to show ' 0 ' , or nothing at all, if the sum is a negative number. For instance, 10-8=12 is ok, but 8-10=-2 is not. How do I do this? Thanks

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451
    First, =sum(BL4-BP4) doesn't make much sense. It needs only to be =BL4-BP4

    Next, to return a zero instead of negative, do this:

    =IF(BL4<BP4,0,BL4-BP4)

    OR

    to return a "nothing at all" instead of negative, do this:

    =IF(BL4<BP4,"",BL4-BP4)
    (use 2 double quotations in place of the zero)

  3. #3
    Anirudh
    Guest

    RE: cell to show ' 0 ' , or nothing at all, if the sum is a negative n

    Hi rdmdale,

    Pls try this

    =IF(B2>A2,B2-A2,A2-B2)

    Anirudh

    "rdmdale" wrote:

    >
    > I'm making a worksheet for my company. I want to subtract one number
    > number from another number. I use the 'sum' format for this
    > '=sum(BL4-BP4) '. This format works fine for me in most cases, if
    > BL4 >BP4. However, if BL4<BP4, the sum that is shown is a negative
    > number. I would like for the worksheet to show only positive numbers. I
    > would like for the cell to show ' 0 ' , or nothing at all, if the sum is
    > a negative number. For instance, 10-8=12 is ok, but 8-10=-2 is not. How
    > do I do this? Thanks
    >
    >
    > --
    > rdmdale
    > ------------------------------------------------------------------------
    > rdmdale's Profile: http://www.excelforum.com/member.php...o&userid=27339
    > View this thread: http://www.excelforum.com/showthread...hreadid=468481
    >
    >


  4. #4
    Anirudh
    Guest

    RE: cell to show ' 0 ' , or nothing at all, if the sum is a negati

    for '0' pls try this

    =IF(B2>A2,B2-A2,0)

    "Anirudh" wrote:

    > Hi rdmdale,
    >
    > Pls try this
    >
    > =IF(B2>A2,B2-A2,A2-B2)
    >
    > Anirudh
    >
    > "rdmdale" wrote:
    >
    > >
    > > I'm making a worksheet for my company. I want to subtract one number
    > > number from another number. I use the 'sum' format for this
    > > '=sum(BL4-BP4) '. This format works fine for me in most cases, if
    > > BL4 >BP4. However, if BL4<BP4, the sum that is shown is a negative
    > > number. I would like for the worksheet to show only positive numbers. I
    > > would like for the cell to show ' 0 ' , or nothing at all, if the sum is
    > > a negative number. For instance, 10-8=12 is ok, but 8-10=-2 is not. How
    > > do I do this? Thanks
    > >
    > >
    > > --
    > > rdmdale
    > > ------------------------------------------------------------------------
    > > rdmdale's Profile: http://www.excelforum.com/member.php...o&userid=27339
    > > View this thread: http://www.excelforum.com/showthread...hreadid=468481
    > >
    > >


  5. #5
    Alan
    Guest

    Re: cell to show ' 0 ' , or nothing at all, if the sum is a negative number

    Do you want the result to actually be zero or nothing if its negative or
    want the figure there for calculations but dot to display it in the cell?
    To make the result zero,
    =IF(BL4-BL9>=0,BL4-BL9,0)
    or for nothing,
    =IF(BL4-BL9>=0,BL4-BL9,"")
    To have the result there but not displayed, Custom Format the cell(s) as
    0.00_ ;
    Note that there's a space between the underscore and the semicolon,
    Regards,
    Alan
    "rdmdale" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I'm making a worksheet for my company. I want to subtract one number
    > number from another number. I use the 'sum' format for this
    > '=sum(BL4-BP4) '. This format works fine for me in most cases, if
    > BL4 >BP4. However, if BL4<BP4, the sum that is shown is a negative
    > number. I would like for the worksheet to show only positive numbers. I
    > would like for the cell to show ' 0 ' , or nothing at all, if the sum is
    > a negative number. For instance, 10-8=12 is ok, but 8-10=-2 is not. How
    > do I do this? Thanks
    >
    >
    > --
    > rdmdale
    > ------------------------------------------------------------------------
    > rdmdale's Profile:
    > http://www.excelforum.com/member.php...o&userid=27339
    > View this thread: http://www.excelforum.com/showthread...hreadid=468481
    >




+ 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