Search code examples
libreofficecountiflibreoffice-calc

LibreOffice Calc -- countif based on string length


I'd like to setup a countif function that counts the cells in a range based on the cell string length.

I've tried inserting the formula as an argument to the countif function, but I can't get it to work.

I wanted to compare the length for each cell in the range with a specific lenght defined somewhere else, but I don't know how to reference back the cell in the range.

One of my failed attempts was =COUNTIF($'Delovni list1'.$D$3:$D$102;">2")

given that the cells in the range are formatted as text. But the above doesn't even work if there are numbers in the cells.

My use case is this: I need to count the cells with 1 specific letter and cells which have many characters.

Thank you. seba


Solution

  • I found this to work: =COUNTIF($'Delovni list1'.$D$3:$D$102;"[:alnum:]..*")

    regards, seba