View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default how do I total the value of the cell to a single value, 37=3+7=10

Try this array-entered** formula...

=SUM(IF(ROW(1:99)<=LEN(A1),--MID(A1,ROW(1:99),1),""))

** Commit this formula with Ctrl+Shift+Enter, not just Enter by itself.

Note: If you enter your digits as text, the above formula will add up to the
first 99 digits. If you would want more than that, just change both 99's to
the same higher digit limit.

--
Rick (MVP - Excel)


"huong" wrote in message
...
Is there a function like substring in excel or something similar like
that.
I would like to add all the digits in a cell to a single value, how would
I
do that?

Thank you very much,

huong