I have a macro from OpenOffice that worked for years. I updated to LibreOffice and when I try to invoke the function it gives me a result “#NAME?”. The function is invoked via =sktot($A13,A108:K122). The function is defined as:
Function SKTOT(Name, Optional Block)
Dim row as integer
For row = LBound(Block, 1) to UBound(block, 1)
If Block(row, 1) = Name Then
SKTOT = Block(row, 5)
Exit Function
End If
Next
SKTOT = "n/a"
End Function
It scans for a match of Name in column 1 (i.e. a108-a122) and returns the data from column 5. I noticed that the function name SKTOT keeps getting changed to lower case but relabeling the function to lower case does not solve the problem. Several other functions seem to work.