ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   average by operand (https://www.excelbanter.com/excel-worksheet-functions/5733-average-operand.html)

Bruce

average by operand
 
I have a column with percentages that are positive and negative.
How do I calculate the Average of the postive's and an Average of the
Negatives?

Bruce



RagDyer

One way:

=SUMIF(B1:B100,"0")/COUNTIF(B1:B100,"0")
=SUMIF(B1:B100,"<0")/COUNTIF(B1:B100,"<0")

--

HTH,

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

"Bruce" wrote in message
...
I have a column with percentages that are positive and negative.
How do I calculate the Average of the postive's and an Average of the
Negatives?

Bruce



BenjieLop


Bruce Wrote:
I have a column with percentages that are positive and negative.
How do I calculate the Average of the postive's and an Average of the
Negatives?

Bruce



If the numbers are in, say, A1:A100, then your formulas a

For the positives: =sumif(A1:A100,"0")/countif(A1:A100,"0")

For the negatives, just simply replace "0" with "<0"


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=275508


Ken Wright

=AVERAGE(IF(A1:A200,A1:A20))
=AVERAGE(IF(A1:A20<0,A1:A20))

array entered using CTRL+SHIFT+ENTER, but what about the 0s, don't they fall
into one of the camps

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Bruce" wrote in message
...
I have a column with percentages that are positive and negative.
How do I calculate the Average of the postive's and an Average of the
Negatives?

Bruce




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004




All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com