+ Reply to Thread
Results 1 to 4 of 4

How to ignore negative numbers

  1. #1
    Registered User
    Join Date
    10-04-2005
    Posts
    73

    How to ignore negative numbers

    Hi I have a column of values generated in excel some of which are positive, some of which are negative.

    Now these figures can change regularly from positive to negative depending on previous figures entered so what I wanted to create was a cell that only adds up the positive numbers in the column but ignores any negative numbers.

    Can anyone help??

    Thanks

  2. #2
    Max
    Guest

    Re: How to ignore negative numbers

    Assuming values are in A1:A10

    Put in say, B1: =SUMPRODUCT(--(A1:A10>0),A1:A10)

    Adapt to suit, but note that
    we can't use entire col references in SUMPRODUCT
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "frustrated" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi I have a column of values generated in excel some of which are
    > positive, some of which are negative.
    >
    > Now these figures can change regularly from positive to negative
    > depending on previous figures entered so what I wanted to create was a
    > cell that only adds up the positive numbers in the column but ignores
    > any negative numbers.
    >
    > Can anyone help??
    >
    > Thanks
    >
    >
    > --
    > frustrated
    > ------------------------------------------------------------------------
    > frustrated's Profile:

    http://www.excelforum.com/member.php...o&userid=27778
    > View this thread: http://www.excelforum.com/showthread...hreadid=472888
    >




  3. #3
    RagDyeR
    Guest

    Re: How to ignore negative numbers

    For entire column references:

    =SUMIF(A:A,">0")

    --

    HTH,

    RD
    =====================================================
    Please keep all correspondence within the Group, so all may benefit!
    =====================================================

    "Max" <[email protected]> wrote in message
    news:e%[email protected]...
    Assuming values are in A1:A10

    Put in say, B1: =SUMPRODUCT(--(A1:A10>0),A1:A10)

    Adapt to suit, but note that
    we can't use entire col references in SUMPRODUCT
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "frustrated" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi I have a column of values generated in excel some of which are
    > positive, some of which are negative.
    >
    > Now these figures can change regularly from positive to negative
    > depending on previous figures entered so what I wanted to create was a
    > cell that only adds up the positive numbers in the column but ignores
    > any negative numbers.
    >
    > Can anyone help??
    >
    > Thanks
    >
    >
    > --
    > frustrated
    > ------------------------------------------------------------------------
    > frustrated's Profile:

    http://www.excelforum.com/member.php...o&userid=27778
    > View this thread: http://www.excelforum.com/showthread...hreadid=472888
    >





  4. #4
    Max
    Guest

    Re: How to ignore negative numbers

    "RagDyeR" wrote:
    > =SUMIF(A:A,">0")


    Much neater to adopt this, without a doubt <g> !
    Thanks, RD !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



+ 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