SUMDIGITS

Returns the sum of the digits in a cell.

'Number - The number containing the digits you want to sum

Function SumDigits(Number)
Dim i As Integer

    For i = 1 To Len(Number)
      SumDigits = SumDigits + Val(Mid(Number, i, 1))
    Next i
End Function



© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext