+ Reply to Thread
Results 1 to 5 of 5

... Count, <<< Positive Values minus Negative Values >>> ...

  1. #1
    Dr. Darrell
    Guest

    ... Count, <<< Positive Values minus Negative Values >>> ...

    I have a column which contains 20 cells with 4 negative values and 12
    positive values.

    I want to do a count, but I only want a count the positive valued cells
    minus the negative valued cells. so the result of the count in this example
    would be 12-4=8.

    How do I write my function?

    Darrell

  2. #2
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by Dr. Darrell
    I have a column which contains 20 cells with 4 negative values and 12
    positive values.

    I want to do a count, but I only want a count the positive valued cells
    minus the negative valued cells. so the result of the count in this example
    would be 12-4=8.

    How do I write my function?

    Darrell
    Hi Darrell

    Try this > =SUM(COUNTIF(A1:A20,">0")-COUNTIF(A1:A20,"<0"))

    This will ignore 0's, blanks and text
    Paul

  3. #3
    Robbo
    Guest

    RE: ... Count, <<< Positive Values minus Negative Values >>> ...

    You can try this:

    =SUM((COUNTIF(A1:A20,">0")-(COUNTIF(A1:A20,"<0"))))

    This counts the positive values, and the negative values, and subtracts them.

    Hope this helps


    "Dr. Darrell" wrote:

    > I have a column which contains 20 cells with 4 negative values and 12
    > positive values.
    >
    > I want to do a count, but I only want a count the positive valued cells
    > minus the negative valued cells. so the result of the count in this example
    > would be 12-4=8.
    >
    > How do I write my function?
    >
    > Darrell


  4. #4
    CLR
    Guest

    RE: ... Count, <<< Positive Values minus Negative Values >>> ...

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

    or, if you prefer,

    =COUNT(A:A)-COUNTIF(A:A,"<=0")

    Vaya con DIos,
    Chuck, CABGx3





    "Dr. Darrell" wrote:

    > I have a column which contains 20 cells with 4 negative values and 12
    > positive values.
    >
    > I want to do a count, but I only want a count the positive valued cells
    > minus the negative valued cells. so the result of the count in this example
    > would be 12-4=8.
    >
    > How do I write my function?
    >
    > Darrell


  5. #5
    Ron de Bruin
    Guest

    Re: ... Count, <<< Positive Values minus Negative Values >>> ...

    Hi Dr. Darrell

    Try this
    =COUNTIF(A1:A20,">0")

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Dr. Darrell" <[email protected]> wrote in message news:[email protected]...
    >I have a column which contains 20 cells with 4 negative values and 12
    > positive values.
    >
    > I want to do a count, but I only want a count the positive valued cells
    > minus the negative valued cells. so the result of the count in this example
    > would be 12-4=8.
    >
    > How do I write my function?
    >
    > Darrell




+ 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