Hitung jumlah sel yang tidak kosong
=COUNTA(value1, [value2], ...)
| Parameter | Deskripsi |
|---|---|
value1 |
An item, cell reference, or range. |
value2 |
[optional] An item, cell reference, or range. |
In the example shown, COUNTA is set up to values in the range B5:B15:
=COUNTA(B5:B15) // returns 9
The COUNTA function counts numbers and text:
=COUNTA(1,2,3) // returns 3
=COUNTA(1,"a","b") // returns 3
=COUNTA(1,2,3,"a",5%) // returns 5
To count non-empty cells in the range A1:A10:
=COUNTA(A1:A10) // count non-empty cells in A1:A10
To count non-empty cells in the range A1:A10 and the range C1:H2:
=COUNTA(A1:A10,C1:H2) // two ranges
Note that COUNTA includes empty strings ("") in the count, which can be returned by formulas. For example, the formula below will return "OK" when the
=IF(A1>=10,"OK","")