ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   add only positive numbers and avg in a column (https://www.excelbanter.com/excel-worksheet-functions/16965-add-only-positive-numbers-avg-column.html)

rich

add only positive numbers and avg in a column
 
I have a column, with both positive and negative numbers.
I want to know how to have Excel count the positive
numbers and then devide by the total number of positve and
neg. numbers. So count the number of positive numbers (say
8) then dived that by the total of cells with numbers in
them (so the 8 positive plus the 5 neg. = 13 cells
w/numbers.) So 8/13. = 61%

thanks for any help.

rich

Steve R


Use Countif() and count()

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)

"rich" wrote in message
...
I have a column, with both positive and negative numbers.
I want to know how to have Excel count the positive
numbers and then devide by the total number of positve and
neg. numbers. So count the number of positive numbers (say
8) then dived that by the total of cells with numbers in
them (so the 8 positive plus the 5 neg. = 13 cells
w/numbers.) So 8/13. = 61%

thanks for any help.

rich




Biff

Hi!

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)


Is zero a positive number?

You're Countif will exclude zero but Count will not.

Biff

-----Original Message-----

Use Countif() and count()

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)

"rich" wrote in message
...
I have a column, with both positive and negative numbers.
I want to know how to have Excel count the positive
numbers and then devide by the total number of positve

and
neg. numbers. So count the number of positive numbers

(say
8) then dived that by the total of cells with numbers in
them (so the 8 positive plus the 5 neg. = 13 cells
w/numbers.) So 8/13. = 61%

thanks for any help.

rich



.


Biff

P.S.

In other words, how does the poster want to handle zeros,
if any?

Biff

-----Original Message-----
Hi!

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)


Is zero a positive number?

You're Countif will exclude zero but Count will not.

Biff

-----Original Message-----

Use Countif() and count()

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)

"rich" wrote in message
...
I have a column, with both positive and negative

numbers.
I want to know how to have Excel count the positive
numbers and then devide by the total number of positve

and
neg. numbers. So count the number of positive numbers

(say
8) then dived that by the total of cells with numbers

in
them (so the 8 positive plus the 5 neg. = 13 cells
w/numbers.) So 8/13. = 61%

thanks for any help.

rich



.

.


rich

there will be NO zero's. but a cell could be blank. i
dont want it counted then.

thanks again.


-----Original Message-----
P.S.

In other words, how does the poster want to handle zeros,
if any?

Biff

-----Original Message-----
Hi!

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)


Is zero a positive number?

You're Countif will exclude zero but Count will not.

Biff

-----Original Message-----

Use Countif() and count()

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)

"rich" wrote in message
.. .
I have a column, with both positive and negative

numbers.
I want to know how to have Excel count the positive
numbers and then devide by the total number of

positve
and
neg. numbers. So count the number of positive numbers

(say
8) then dived that by the total of cells with numbers

in
them (so the 8 positive plus the 5 neg. = 13 cells
w/numbers.) So 8/13. = 61%

thanks for any help.

rich


.

.

.


Biff

Then Steve's formula will work just fine.

Biff

-----Original Message-----
there will be NO zero's. but a cell could be blank. i
dont want it counted then.

thanks again.


-----Original Message-----
P.S.

In other words, how does the poster want to handle

zeros,
if any?

Biff

-----Original Message-----
Hi!

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)

Is zero a positive number?

You're Countif will exclude zero but Count will not.

Biff

-----Original Message-----

Use Countif() and count()

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)

"rich" wrote in message
. ..
I have a column, with both positive and negative

numbers.
I want to know how to have Excel count the positive
numbers and then devide by the total number of

positve
and
neg. numbers. So count the number of positive

numbers
(say
8) then dived that by the total of cells with

numbers
in
them (so the 8 positive plus the 5 neg. = 13 cells
w/numbers.) So 8/13. = 61%

thanks for any help.

rich


.

.

.

.


Bob Phillips


"Biff" wrote in message
...
Hi!

=COUNTIF(A1:A10,"0")/COUNT(A1:A10)


Is zero a positive number?


As positive and negative are defined in terms of zero, it is neither.




All times are GMT +1. The time now is 12:00 AM.

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