ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   COUNTIF absolute value of cells in a range are 0 (https://www.excelbanter.com/excel-discussion-misc-queries/128553-countif-absolute-value-cells-range-0-a.html)

Dave F

COUNTIF absolute value of cells in a range are 0
 
How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.

RagDyeR

COUNTIF absolute value of cells in a range are 0
 
Have you tried:

=SUM(H5:H103)/COUNTIF(H5:H103,"<0")
?

--

HTH,

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

"Dave F" wrote in message
...
How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the
positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.



Dave F

COUNTIF absolute value of cells in a range are 0
 
No I haven't tried that, but I suppose that should have been obvious....thanks.
--
Brevity is the soul of wit.


"RagDyeR" wrote:

Have you tried:

=SUM(H5:H103)/COUNTIF(H5:H103,"<0")
?

--

HTH,

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

"Dave F" wrote in message
...
How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the
positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.




pinmaster

COUNTIF absolute value of cells in a range are 0
 
Hi Dave

Not sure what is the purpose of your post since you probably know the answer
but:

COUNTIF(H5:H103,"<0")

hope I passed the test :)

Regards!
Jean-Guy

"Dave F" wrote:

How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.


driller

COUNTIF absolute value of cells in a range are 0
 
by trying to figure out the complete formula u have
it looks clear u need an average function

=AVERAGE(IF((H5:H10<0),(H5:H10<0)*H5:H10))
hit ctrl-shft-enter

surely u know this especially when u want to consider a BLANK CELL as not
part of the count and has an If 0 value...data with text can be trapped since
the result will be an error - good time to fix the data..
regards
--
*****
birds of the same feather flock together..



"Dave F" wrote:

How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.


Dave F

COUNTIF absolute value of cells in a range are 0
 
The purpose of the post is that I was not thinking. Yes, the answer is
obvious.

Sorry about this.
--
Brevity is the soul of wit.


"pinmaster" wrote:

Hi Dave

Not sure what is the purpose of your post since you probably know the answer
but:

COUNTIF(H5:H103,"<0")

hope I passed the test :)

Regards!
Jean-Guy

"Dave F" wrote:

How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.


pinmaster

COUNTIF absolute value of cells in a range are 0
 
Hi,

Blank cells and text do not affect an average formula so it could be
simplified to:

=AVERAGE(IF(H5:H103<0,H5:H103))
enter using Ctrl+Shift+Enter


Regards!
Jean-Guy

"driller" wrote:

by trying to figure out the complete formula u have
it looks clear u need an average function

=AVERAGE(IF((H5:H10<0),(H5:H10<0)*H5:H10))
hit ctrl-shft-enter

surely u know this especially when u want to consider a BLANK CELL as not
part of the count and has an If 0 value...data with text can be trapped since
the result will be an error - good time to fix the data..
regards
--
*****
birds of the same feather flock together..



"Dave F" wrote:

How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.


driller

COUNTIF absolute value of cells in a range are 0
 
thats right again...
=AVERAGE(IF(H5:H103<0,H5:H103))
with c-s-e
if strickly not need to count a text somewhere in the data, and without
bothering to check if there are some invalid data.
regards2,

--
*****
birds of the same feather flock together..



"pinmaster" wrote:

Hi,

Blank cells and text do not affect an average formula so it could be
simplified to:

=AVERAGE(IF(H5:H103<0,H5:H103))
enter using Ctrl+Shift+Enter


Regards!
Jean-Guy

"driller" wrote:

by trying to figure out the complete formula u have
it looks clear u need an average function

=AVERAGE(IF((H5:H10<0),(H5:H10<0)*H5:H10))
hit ctrl-shft-enter

surely u know this especially when u want to consider a BLANK CELL as not
part of the count and has an If 0 value...data with text can be trapped since
the result will be an error - good time to fix the data..
regards
--
*****
birds of the same feather flock together..



"Dave F" wrote:

How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.


driller

COUNTIF absolute value of cells in a range are 0
 
i forgot that the absolute value of
cell A1= k
k0 = true

--
*****
birds of the same feather flock together..



"pinmaster" wrote:

Hi,

Blank cells and text do not affect an average formula so it could be
simplified to:

=AVERAGE(IF(H5:H103<0,H5:H103))
enter using Ctrl+Shift+Enter


Regards!
Jean-Guy

"driller" wrote:

by trying to figure out the complete formula u have
it looks clear u need an average function

=AVERAGE(IF((H5:H10<0),(H5:H10<0)*H5:H10))
hit ctrl-shft-enter

surely u know this especially when u want to consider a BLANK CELL as not
part of the count and has an If 0 value...data with text can be trapped since
the result will be an error - good time to fix the data..
regards
--
*****
birds of the same feather flock together..



"Dave F" wrote:

How would I use COUNTIF to count only those cells whose absolute values are
greater than 0?

This is my formula: =SUM(H5:H103)/COUNTIF(H5:H103,"0") But there are
negative numbers in the range which should be counted as well as the positive
numbers. I only want to exclude 0 values.

Thanks,

Dave
--
Brevity is the soul of wit.



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

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