Don’t know if that will work in your case, but it might be worth a look. In your example, put this formula in A5 Code: Select all Expand view Collapse view IF(A1 8 1 '') The formula Code: Select all Expand view. OpenOffice distinguishes between a cell that contains nothing and a cell that contains a formula that returns an empty string.
#Openoffice calc count non empty cells how to
You could also see if there is inspiration in this StackOverflow Q&A about the same situation in Google Docs spreadsheet, with a different solution offered. I showed how to count blank cells here using the SUMPRODUCT() function. (And you might need to enable Regular Expressions in Formula: go to Options > LibreOffice Calc > Calculate for the check-box.)Įxplanation of regex square brackets group alternates ), or a column header (enclosed in quotation marks ), or a cell referring to a column header, or 0 to include all columns. It may be a column number (1 is the first column of the database table, 2 is the second. Syntax: DCOUNTA(databasetable field criteriatable) where databasetable is a range defining the data to be processed. For example, enter NOW() in a cell in a blank worksheet and format the cell to display time, including. In other words: If the cell contains a formula that returns nothing (or if it contains the empty text string), BLANK () will be FALSE.Is there a way to check if a cell contains displayable content, such as a text string or a number. Counts the non-empty cells in a column of a Calc 'database' table, in rows which meet specified criteria. This can be the case with date and time calculations. I don’t know if that example is bullet-proof, though. In LibreOffice Calc the BLANK () formula will only return TRUE on cells with the underlying datatype blank. Which returns “0” for your example, since COUNTIF can use regular expressions. So it is behaving “correctly”.ĭepending on the nature of your data, you could try this: =COUNTIF(A1:A2, "+") According to the official help, COUNTA counts “text entries …, even when they contain an empty string of length 0”.