![]() |
How do I take a number from a cell and mult each digit by
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? |
How do I take a number from a cell and mult each digit by
|
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? |
How do I take a number from a cell and mult each digit by
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? |
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? |
How do I take a number from a cell and mult each digit by
I think I got bogged down in thinking of equal array sizes?
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "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 |
All times are GMT +1. The time now is 06:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com