View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default How do I take a number from a cell and mult each digit by

or even without the VALUE(...) or a --

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

Regards,
Peter T

"Peter T" <peter_t@discussions wrote in message
...
Hi Bob,

just this one -

If some other number, say 7



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


why not simply -

=SUMPRODUCT(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1) )),1))*7)

Regards,
Peter T

"Bob Phillips" wrote in message
...
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?