Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dr. Darrell
 
Posts: n/a
Default ... 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   Report Post  
Paul Sheppard
 
Posts: n/a
Default


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   Report Post  
Robbo
 
Posts: n/a
Default

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   Report Post  
CLR
 
Posts: n/a
Default

=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   Report Post  
Ron de Bruin
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 0 May 15th 05 08:14 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 02:37 AM
Count number to reach a cumulative value Bruce Excel Worksheet Functions 5 January 25th 05 06:14 PM


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"