Home |
Search |
Today's Posts |
#1
|
|||
|
|||
... 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
|
|||
|
|||
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 Hi Darrell Try this =SUM(COUNTIF(A1:A20,"0")-COUNTIF(A1:A20,"<0")) This will ignore 0's, blanks and text -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=465879 |
#3
|
|||
|
|||
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
|
|||
|
|||
=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
|
|||
|
|||
Hi Dr. Darrell
Try this =COUNTIF(A1:A20,"0") -- Regards Ron de Bruin http://www.rondebruin.nl "Dr. Darrell" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions | |||
Count Position of Filtered TEXT cells in a column | Excel Worksheet Functions | |||
Count Position of Filtered TEXT cells in a column | Excel Worksheet Functions | |||
SUMPRODUCT Formula to Count Row of data Below Matched Criteria | Excel Worksheet Functions | |||
Count number to reach a cumulative value | Excel Worksheet Functions |