Wrong/ambiguous counting of filtered/hidden rows displayed in status bar?

I’m still learning my way around LibreOffice, so please pardon me if this was done by design. I selected a column with 20 rows displayed (numerous rows were hidden in between), and the status bar reports: Selected: 24 rows, 1 column

This was once an MS Excel sheet that was converted with the Document Converter wizard, so I am no longer sure how various rows were hidden/filtered. However, it doesn’t seem to count all non-displayed rows equally:

Before I worry about sanitizing this sensitive worksheet and/or opening a bug report, can anyone explain how/why this behavior might be expected/correct? Also, I found this old bug specifically about the count for filtered rows being off, but supposedly this was closed in 7.2.0 and I’m using 7.3.2.2:
https://bugs.documentfoundation.org/show_bug.cgi?id=84517

Of course, I cannot give an exact answer to this question. It is possible that the problem is related to a bug. On the other hand, it could also be related to the document, to this particular spreadsheet.
I was able to replicate this counter behavior on a clean test table. Now I will explain what I did.
I created a test data column, applied an autofilter and hide part of the rows by condition - it’s simple and clear, Calc correctly calculated all the selected cells.
And then I selected one of the visible rows and gave it a height of 0. And after that Calc started counting “incorrectly”.
Indeed, if we do not see the row, then we think that it is hidden. The program has much better vision than ours - it sees even very small rows, zero height.
This is just my guess, I do not insist that this is your problem. However, try displaying all rows, Format - Rows - Optimal Height, and reapply the filter. What is the result?

1 Like

I have “fixed” this for my purposes by resetting the row height to 0.21", which effectively deactivated my filter, then I properly set the condition for the autofilter to hide the rows I didn’t want to see. That gives me the correct number of Selected: 20 rows, 1 column.

Is LO Calc “supposed” to ignore hidden cells when they are properly hidden using the context menu?
20220526-LO-Counting_Selected_Cells_W_Hidden_Rows-Hide_Row_Context_Menu

If so, that feature is not working correctly because it is reporting 10 rows instead of the 6 that are actually “shown.”
20220526-LO-Counting_Selected_Cells_W_Hidden_Rows-Counts_Hidden_Rows

No.

The difference is filtered vs hidden. It’s on purpose. Filtered out rows are excluded from selection, calculation with SUBTOTAL() and copy-pasting. Hidden rows just have a height 0 to visually hide them and are included in all operations. Only AGGREGATE() can exclude/ignore hidden rows in calculations.

3 Likes