View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default How to determine the number?

Try this
Sub addupnumberdigits()
ac = ActiveCell
mysum = 0
For i = 1 To Len(ac)
mysum = mysum + Mid(ac, i, 1)
Next i
MsgBox mysum
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Eric" wrote in message
...
Does anyone have any suggestions on how to determine the number?
For example, 2584 in cell A1, then it should return 2+5+8+4=19 in cell B1.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric