I have a column of currency where only some of the cells have a value. How can I calculate the total number of non-zero cells in that column? The number of rows in the spreadsheet can vary.
If you want to count (e.g.) all cells of column B which neither are blank (no content at all) nor contain text nor contain a formula returning 0 as its value, you can use =COUNT(B:B)-COUNTIF(B:B;0)
. The described cells are those either containing a constant number different from 0 (zero) or a formula returning a numeric result different from 0 (zero).
(Concerning their “value” blank cells are treated differently by formulas depending on the used functions and operators. Therefore I used precise but rather wordy definitions above.)