how do I total the value of the cell to a single value, 37=3+7=10

  • Thread starter Thread starter huong
  • Start date Start date
H

huong

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
 
click the cell and type an equal sign then a number then a plus sign, like so

=5+5+4+3
cell should equal 17
 
=SUMPRODUCT(--MID($A$1,ROW(INDIRECT("1:" & LEN($A$1))),1))

37 returns 10

123 returns 6


Gord Dibben MS Excel MVP
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top