SUMDIGITS
SUMDIGITS(Number)
Returns the sum of the digits in a cell.
| Number | The number containing the digits you want to sum |
REMARKS
??
Public Function SUMDIGITS( _
ByVal Number As Double) _
As Double
Dim i As Integer
Dim sngReturn As Single
For i = 1 To Len(Number)
sngReturn = sngReturn + Val(Mid(Number, i, 1))
Next i
SUMDIGITS = sngReturn
End Function
For instructions on how to add this function to a workbook refer to the page under Inserting Functions
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext