Good morning,

I requested assistance in creating the below macro. It works fantastically. I've discovered that it has more capabilities than I'd originally understood. Thank for the creation.

But, I have a buddy that uses Lotus SmartSuite (I know, he needs to convert) and I've described what this function can do. I sent him this function and he placed it in his Lotus Script Editor. He says that it isn't working, that the majority of it turns "red" in the Lotus Editor. He told me that it appears that the "ParamArray" didn't convert. Does anyone here know both Excel VBA and LotusScript that may be able to convert this function to SmartSuite usage?

Function ADD_POSITION(Position, ParamArray cells()) As Double
'   This function will "Locate" and "ADD" the digits in a specified location within a whole number.
'   This function works with any number of "specified" cell addresses.
'   POSITION equals the (1's, 10's, 100's, 1000's, etc.) position within the whole number.
'
'   Generic Usage: =ADD_POSITION(Position,Cell_1,Cell_2,Cell_3,Cell_4,etc.)
'   Cell usage 1: =ADD_POSITION(1,A1,A2,A3,A4)
'   Cell usage 2: =ADD_POSITION(10,A1,A2,A3,A4)
'   Cell usage 3: =ADD_POSITION(100,A1,A2,A3,A4)
'
   Dim n As Long
   Dim rCell As Range
   Dim dTemp As Double
   
   For n = LBound(cells) To UBound(cells)
      If TypeName(cells(n)) = "Range" Then
         For Each rCell In cells(n).cells
            dTemp = dTemp + GetPOSITION(Position, rCell.Value)
         Next rCell
      End If
   Next n
   ADD_POSITION = dTemp

End Function

Function GetPOSITION(Position, vVal) As Long
   If IsNumeric(vVal) Then
         GetPOSITION = CLng(Right(vVal \ Position, 1))
   End If
End Function
I don't know what to tell him. I'd appreciate any assistance in converting this function for his use. Thank you for taking the time to consider this request.