I was looking for a way to adapt an Excel VBA script to work on Google Sheets, but I cannot find any explanation about how to do this. Where can I find that information. Here is the VBA script that I'm trying to convert.
Code:
Function Numerology(WhatDate As Variant) As Long
Dim lngLoop As Long
Dim lngSum As Long
Dim strNumber As String
strNumber = Format(WhatDate, "yyyymmdd")
Do While Len(strNumber) > 1
lngSum = 0
For lngLoop = 1 To Len(strNumber)
lngSum = lngSum + CLng(Mid(strNumber, lngLoop, 1))
Next lngLoop
strNumber = CStr(lngSum)
Loop
Numerology = lngSum
End Function