COUNTCOLS Function
Counts the values in each column of the Table_Range to produce a horizontal array of the counts of the columns. Either all information values (COUNTA) or only numbers (COUNT) can be counted.
Dynamically adjusts to the number of rows and columns in Table_Range: use COUNTCOLS when you want non-floating totals for dynamic arrays.
COUNTCOLS is a multi-threaded, non-volatile array function.
COUNTCOLS Syntax
COUNTCOLS (Table_Range [, Exclude_Cols] [,All])
Table_Range
Array, Table, Range or Spill reference whose columns are to be counted.
Exclude_Cols (Optional. Default no columns will be excluded)
Optional. If omitted all columns will be counted. A list (array or range) identifying the columns that are not to be counted, given as one of:
If Table_Range is not an array: One or more ranges within Table_Range. Multiple disjoint ranges must be enclosed in ( ) – for example (A1:B1,D1) results in columns 1,2 and 4.
Alphabetic labels are used as lookup values in the first row of Table_Range to find the columns. These labels can be supplied in an array or a range.
Relative column numbers are used directly. These column numbers can be supplied in an array or range.
For example {2,4} gets the second and fourth column of the Table_Range. Negative numbers work from right to left so {-1, -2) gets the last two columns of the Table_Range.
Zero acts as an include operator. {1,0,5} results in Columns 1 through 5 inclusive {1,5} results in Column 1 and Column 5 only {5,0} results in Column 5 and all Columns after Column 5 {0,5} results in the first 5 Columns
All (Optional. Default TRUE)
Optional. Default True. True counts cells containing any kind of information but not empty cells (COUNTA). False only counts numbers (COUNT).
|