As far as I know, only the the numbered functions 1,2,3 and 101,102,103 usable with SUBTOTAL() regard whether the rows are filtered (out!) or invisible due to hiding respectively. These functions use AVERAGE()
, COUNT()
and COUNTA()
in this order. The term “filter” only occurs in 6.16.60 SUBTOTAL
in all the OpenDocument-v1.3-cs01-part4-formula
document specifying the Calc functions alongside with other topics.
However, it is simple to determine “filtered” (not out) and “visible” by user code, in specific if a range can be passed based on on the module option VBAsupport 1
. The following function is a generic array-function.
Option VBAsupport 1
Function isApplicableRow(pRange As Object, PMode As String)
REM pMode: "f" NOT filterd out, "v" viisible
REM The usage of the term "filtered is ambiguous.
REM LibO API tells IsFiltere=True if the row is filtered OUT.
REM Common usage seems to prefer the opposite.
REM Here "f" addresses rows which passed the filter.
REM The range may have an arbitrary number of columns. Only rows apply.
rs = pRange.CellRange.Rows
u = rs.Count - 1
Dim out(u, 0) As Boolean
For j = 0 To u
Select Case Ucase(pMode)
Case "F"
out(j, o) = NOT rs(j).IsFiltered
Case "V"
out(j, 0) = rs(j).IsVisible
Case Else
REM No action
End Select
Next j
isApplicableRow = out
End Function