COUNTA

COUNTA(value1 [,value2] [..])

Returns the number of numerical values in a list, table or cell range (including logical values and text).

value1The first value.
value2(Optional) The second value.

REMARKS
* This function is identical to the COUNT function except that logical values, text and errors are included.
* This function includes hidden cells.
* This function excludes empty cells but includes everything else. See Example 8.
* Arguments that are just text are included. See Example 18.
* Arguments that are references to cells containing logical values are included. See Example 11.
* Arguments that are references to cells containing text are included. See Example 10.
* Arguments that are references to cells containing error values are included. See Example 14.
* Arguments that are arrays containing logical values are included. See Example 20.
* Arguments that are arrays containing text are included. See Example 19.
* You can have a maximum of 255 arguments.
* You can use the COUNT function to return the number of numerical values.
* You can use the COUNTIFS function to return the number of numerical values that satisfies multiple conditions.
* You can use the COUNTBLANK function to return the number of blank cells.
* You can use the DCOUNTA function to return the number of numerical values in a column that satisfies multiple conditions (including logical values and text).
* You can use the COUNTAVISIBLE - User Defined Function to exclude hidden cells.
* This is similar to the AVERAGEA, MAXA and MINA functions.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=COUNTA(1, 2, 3) = 35
2=COUNTA(1, 2, 3, 0) = 410
3=COUNTA(-2, -3, 4, 5, 6) = 515
4=COUNTA({-2, -3, 4, 5, 6}) = 5 
5=COUNTA(B1:B3) = 30
6=COUNTA(B1, B2, B3) = 3text
7=COUNTA(B1, B2, B3, B4) = 3TRUE
8=COUNTA(B1, B2, B3, B5) = 4FALSE
9=COUNTA(B1, B2, B3, B6) = 4=DATE(2024, 1, 1) = 01 Jan 2024
10=COUNTA(B0, B1, B2, B7) = 4=10/0 = #DIV/0!
11=COUNTA(B1, B2, B3, B8) = 4 
12=COUNTA(B1, B2, B3, B9) = 4 
13=COUNTA(named_range) = 3 
14=COUNTA(B1, B2, B3, B10) = 4 
15=COUNTA(2, "3") = 2 
16=COUNTA(2, TRUE) = 2 
17=COUNTA(2, FALSE) = 2 
18=COUNTA(2, "some text") = 2 
19=COUNTA({2, "some text"}) = 2 
20=COUNTA({2, TRUE}) = 2 

1 - How many of these values are numerical (1,2,3).
2 - How many of these values are numerical (1,2,3,0). Zeros are always included.
3 - How many of these values are numerical (-2,-3,4,5,6).
4 - How many of the values are numerical in this array {-2,-3,4,5,6}.
5 - How many cells contain numerical values in the range "B1:B3".
6 - How many cells contain numerical values in the range "B1", "B2" and "B3".
7 - How many cells contain numerical values in the range "B1", "B2", "B3" and "B4". B4 is empty so this gets excluded.
8 - How many cells contain numerical values in the range "B1", "B2", "B3" and "B5". B5 is zero so this gets included.
9 - How many cells contain numerical values in the range "B1", "B2", "B3" and "B6". B6 is text so this gets included.
10 - How many cells contain numerical values in the range "B1", "B2", "B3" and "B7". B7 is a logical value so this gets included. TRUE is replaced with 1.
11 - How many cells contain numerical values in the range "B1", "B2", "B3" and "B8". B8 is a logical value so this gets included. FALSE is replaced with 0.
12 - How many cells contain numerical values in the range "B1", "B2", "B3" and "B9". B9 is a date so this gets included.
13 - How many cells contain numerical values in the named range that refers to the range "B1:B3".
14 - How many cells contain numerical values in the range "B1", "B2", "B3" and "B10". B10 contains an error so this gets included.
15 - How many of the values (2, "3") are numerical. Text values that are actually numbers are included.
16 - How many of the values (2, TRUE) are numerical. Logical values passed as arguments are included. TRUE is replaced with 1.
17 - How many of the values (2, FALSE) are numerical. Logical values passed as arguments are included. FALSE is replaced with 0.
18 - How many of the values (2, "some text") are numerical. Text values passed as arguments are included.
19 - How many of the values are numerical in the array {2, "some text"}. Text values inside arrays are included.
20 - How many of the values are numerical in the array {2, TRUE}. Logical values inside arrays are included.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top