View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How do I take a number from a cell and mult each digit by

If you want to multiply them all by 1

=SUMPRODUCT(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))

If some other number, say 7

=SUMPRODUCT(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),--(ROW(INDIRECT("1:"&L
EN(A1)))^0*7))

If by some set of weightings, such as 56432684

=SUMPRODUCT(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),--(MID("56432684",ROW(
INDIRECT("1:"&LEN(A1))),1)))

or if using those weightings aligned (i.e. final digit by 4, previous by 8,
etc.)

=SUMPRODUCT(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),--(MID("56432684",LEN(
"56432684")-ROW(INDIRECT("1:"&LEN(A1)))+1,1)))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"greyhound girl" <greyhound wrote in message
...
I need to take the number entered into a cell and then take each digit of
that number and multiply it by another. Can this be done outside of

coding?