Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default 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.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 740
Default 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.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default 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.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default 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.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 740
Default 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.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 740
Default 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.

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
Copy cells from named range Melissa Excel Discussion (Misc queries) 0 January 19th 07 08:15 PM
COUNTIF in a range (and parts of cells) Phrank Excel Worksheet Functions 3 October 10th 06 10:51 AM
UDF is updateing cells on another sheet with count from current sheet. John Excel Discussion (Misc queries) 3 March 20th 06 03:58 PM
Select Range of Cells programmingrookie Excel Discussion (Misc queries) 2 August 11th 05 07:13 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM


All times are GMT +1. The time now is 12:25 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"