Libreoffice-Calc: Count number of rows and ouput total below list
15,555
There are different approaches:
-
Use
COUNTIF()
, comparing the rows range with an empty string:=COUNTIF(A1:A3;"<>''")
-
use
COUNTBLANK()
and subtract the result from the sum of rows:=ROWS(A1:A3)-COUNTBLANK(A1:A3)
In both cases, just enter the formula in A4 and drag it to the right, LO Calc will adapt the cell references automatically.
Related videos on Youtube
Author by
Roland Seuhs
Updated on September 18, 2022Comments
-
Roland Seuhs over 1 year
How to write a macro that counts the number of columns that contain data and prints the result at the bottom of the list?
For example, if the data is:
|1|2|3| |a| | | |1| |3|
The final table would be:
|1|2|3| |a| | | |1| |3| |=|=|=| |3|1|2|