If I change the formula like this:
Function SortWithFilter(sFilter As String) As Variant
Dim i As Long, j As Long
Dim aRes As Variant
Dim aData as Variant
aData = Array(51)
oSheet = ThisComponent.Sheets.getByName("myBase")
aData = oSheet.getCellRangebyName("A2:A53")
...
is showing this error:
Array must be dimensionded.
Here’s an example: