To Sum the digits of a result


Posted by Mark Gravelle on November 09, 2001 8:46 AM

I am trying to create a formula to sum the 2 digits of a result to give me a new result.

Purpose: Barcoding Check digit must be a single digit between 1 & 9.

Example: Multiply 9x2 = 18
Add the 2 digits of the result: 1+8 = 9
9 is the value I need.

So far my if statement looks like this:
=IF(D4*D3>9,?,D4)
I need help with the "then do this" part of the formula.

Posted by Dank on November 09, 2001 9:01 AM

=VALUE(LEFT(E8,1)) + VALUE(RIGHT(E8,1)) (NT)

=VALUE(LEFT(E8,1)) + VALUE(RIGHT(E8,1))

Posted by IML on November 09, 2001 9:04 AM

Also you could use =LEFT(A1)+RIGHT(A1) (nt)

Posted by mark on November 09, 2001 9:13 AM

Thanks (both of you), that worked perfectly.

Posted by IML on November 09, 2001 9:26 AM

Re: Thanks (both of you), that worked perfectly.

I just reread your if statement, if your worried about a one digit number, you could modify it to
=LEFT(A1)*(LEN(A1)>1)+RIGHT(A1)

Posted by Mark W. on November 09, 2001 10:23 AM

=SUM((0&MID(D3*D4,{1,2},1))+0) (nt)



Posted by Mark W. on November 09, 2001 10:27 AM

=LEFT(E8)+RIGHT(E8) would suffice (nt)