+ Reply to Thread
Results 1 to 4 of 4

sum to only return +ve numbers

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2

    sum to only return +ve numbers

    I am trying to figure out how to get a simple sum A1-A2 to only return +ve numbers if the outcom is -ve then I need it to return zero.

    Any help appreciated

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,653

    Re: sum to only return +ve numbers

    =max(a1+a2, 0)
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: sum to only return +ve numbers

    Thanks i have assumed you meant a1-a2 and not a1+a2.

    I dont suppose you know how to expand this so if a2 = 0 then it returns zero as well do you?

  4. #4
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,653

    Re: sum to only return +ve numbers

    =max((a1-a2)*(a2<>0), 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