Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?
  #3   Report Post  
Posted to microsoft.public.excel.programming
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?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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?




  #5   Report Post  
Posted to microsoft.public.excel.programming
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?








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu via OfficeKB.com Excel Worksheet Functions 1 February 21st 07 02:32 PM
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu Excel Worksheet Functions 1 February 21st 07 10:00 AM
How do I seperate a 10 digit number into one cell for each number? Tkriger Excel Discussion (Misc queries) 2 January 26th 07 04:29 PM
Color a single digit in a mult-digit number cell Phyllis Excel Discussion (Misc queries) 6 November 17th 05 12:46 AM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM


All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"