ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Number of non-zero values in a column (https://www.excelbanter.com/excel-worksheet-functions/168047-number-non-zero-values-column.html)

Nick Payne

Number of non-zero values in a column
 
Given a column of numbers, is there a formula to return the number of cells
containing a non-zero value? ie. Cells can be empty, contain zero, or
contain a number.

Nick


Elkar

Number of non-zero values in a column
 
How about this:

=COUNTIF(A1:A100,"<0")

HTH,
Elkar


"Nick Payne" wrote:

Given a column of numbers, is there a formula to return the number of cells
containing a non-zero value? ie. Cells can be empty, contain zero, or
contain a number.

Nick



Nick Payne

Number of non-zero values in a column
 
Thanks. That was almost it. To allow for empty cells, I had to use
=COUNTIF(A1:A100,"<0")-COUNTBLANK(A1:A100)

Nick

"Elkar" wrote in message
...
How about this:

=COUNTIF(A1:A100,"<0")

HTH,
Elkar


"Nick Payne" wrote:

Given a column of numbers, is there a formula to return the number of
cells
containing a non-zero value? ie. Cells can be empty, contain zero, or
contain a number.




All times are GMT +1. The time now is 06:53 PM.

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