VBA vs Google sheets

in excel •  8 years ago  (edited)

A have a VBA module for xlsx file. Does anyone know how to convert it to make it usable in Google sheets?

Function oNumberss(RNG As Range) As Double
Dim RegEx As Object
Dim ssl As String, S_Summ As Double
For n = 1 To RNG.Columns.Count
For m = 1 To RNG.Rows.Count
ssl = ssl & RNG.Cells(m, n)
Next: Next
Set RegEx = CreateObject("VBScript.RegExp")
With RegEx
.Global = True
.Pattern = "\D"
ssl = .Replace(ssl, " ")
End With
Set objRegEx = Nothing
ssl = RTrim(LTrim(ssl))
sl = Split(ssl, " ", -1)
For n = 0 To UBound(sl)
If sl(n) <> "" Then
S_Summ = S_Summ + sl(n)
End If: Next
oNumberss = S_Summ
End Function*

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Good vba developer here - [email protected]