+ Reply to Thread
Results 1 to 12 of 12

Ignoring Negative Values in SUM function

  1. #1
    Registered User
    Join Date
    03-30-2013
    Location
    Oradea
    MS-Off Ver
    Excel 2010
    Posts
    10

    Ignoring Negative Values in SUM function

    Greetings.
    My question is, how can I use IF in SUM function, or use some other function, to calculate only the positive values and ignore the negative values.
    For example. I want to calculate the monetary values in a column, and I only want excel to sum values higher than 0 and ignore the ones lower the 0. How can it be done?
    Last edited by Rocksteady; 03-30-2013 at 05:45 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ignoring Negative Values in SUM function

    Try

    =SUMIF(A2:A100,">0",A2:A100)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Ignoring Negative Values in SUM function

    Quote Originally Posted by Fotis1991 View Post
    Try

    =SUMIF(A2:A100,">0",A2:A100)
    If the criteria range and the sum range are the same then you can do it like this:

    =SUMIF(A2:A100,">0")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    03-30-2013
    Location
    Oradea
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Ignoring Negative Values in SUM function

    Quote Originally Posted by Tony Valko View Post
    If the criteria range and the sum range are the same then you can do it like this:

    =SUMIF(A2:A100,">0")
    It worked. Thank you.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Ignoring Negative Values in SUM function

    You're welcome. Thanks for the feedback!

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ignoring Negative Values in SUM function

    Quote Originally Posted by Rocksteady View Post
    It worked. Thank you.

    ..And this one? Does not works?

    =SUMIF(A2:A100,">0",A2:A100)

  7. #7
    Registered User
    Join Date
    03-30-2013
    Location
    Oradea
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Ignoring Negative Values in SUM function

    Quote Originally Posted by Fotis1991 View Post
    ..And this one? Does not works?

    =SUMIF(A2:A100,">0",A2:A100)
    This works also Fotis1991. It was just easier to exclude one more line in the formula. But it works the same. Thank you.

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ignoring Negative Values in SUM function

    @ Rocksteady



    Quote Originally Posted by Tony Valko View Post
    If the criteria range and the sum range are the same then you can do it like this:

    =SUMIF(A2:A100,">0")
    OK. Biff..

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Ignoring Negative Values in SUM function

    That is the KISS method.


  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ignoring Negative Values in SUM function

    Hoping that i don't express the last "S"...

    Regards

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Ignoring Negative Values in SUM function

    Quote Originally Posted by Fotis1991 View Post
    Hoping that i don't express the last "S"...
    I do it quite often!

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ignoring Negative Values in SUM function

    .................................

+ 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