Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default can i multiply digits of a number by a constant in excel?

What I want to do is to calculate a "check digit" based on a number. First
digit of the number is multiplied by 2, next by 3, ... next by 7, next by 2
again..

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 268
Default can i multiply digits of a number by a constant in excel?

Something like -
=LEFT(A5,1)*2+MID(A5,2,1)*3+MID(A5,3,1)*4
will do the trick.

LEFT takes the first digit and multiplies it by 2 (the multiplier can be
changed)
and adds
MID takes the second digit and multiplies it by 3 (can be changed)
and adds
MID takes the third digit and multiplies it by 4

You can modify this according to the number of digits and multiplier . It
does, however, expect the base number to have the same number of digits
every time. If the number of digits in the base number is variable the
formula will have to be varied (and become more complicated). If so come
back and I will have a re-think. I wouldn't be surprised if this is not the
most eloquent solution!

Regards.

Bill Ridgeway
Computer Solutions

"El Criollo" <El wrote in message
...
What I want to do is to calculate a "check digit" based on a number. First
digit of the number is multiplied by 2, next by 3, ... next by 7, next by
2
again..



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default can i multiply digits of a number by a constant in excel?

Excellent...worked perfect... Thank you a lot
Now I have another question... Say A=65, B=66.. etc..
I want to convert the alfanumeric value "AB25" into 656625...
Cant find the way to replace A for 65 and B for 66 followed by 25 to make a
single number...
Is this possible???
THANX

"Bill Ridgeway" wrote:

Something like -
=LEFT(A5,1)*2+MID(A5,2,1)*3+MID(A5,3,1)*4
will do the trick.

LEFT takes the first digit and multiplies it by 2 (the multiplier can be
changed)
and adds
MID takes the second digit and multiplies it by 3 (can be changed)
and adds
MID takes the third digit and multiplies it by 4

You can modify this according to the number of digits and multiplier . It
does, however, expect the base number to have the same number of digits
every time. If the number of digits in the base number is variable the
formula will have to be varied (and become more complicated). If so come
back and I will have a re-think. I wouldn't be surprised if this is not the
most eloquent solution!

Regards.

Bill Ridgeway
Computer Solutions

"El Criollo" <El wrote in message
...
What I want to do is to calculate a "check digit" based on a number. First
digit of the number is multiplied by 2, next by 3, ... next by 7, next by
2
again..




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 620
Default can i multiply digits of a number by a constant in excel?

See one of your two other posts.
--
David Biddulph

"El Criollo" wrote in message
...
Excellent...worked perfect... Thank you a lot
Now I have another question... Say A=65, B=66.. etc..
I want to convert the alfanumeric value "AB25" into 656625...
Cant find the way to replace A for 65 and B for 66 followed by 25 to make
a
single number...
Is this possible???



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
Automatically multiply be a number. lee lee Excel Worksheet Functions 1 April 7th 06 04:24 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Access Excel Linked Text and Number Issues Scott Excel Discussion (Misc queries) 2 October 4th 05 09:24 PM
Least number of digits in Y-axis labels Charley Kyd Charts and Charting in Excel 9 February 6th 05 03:03 PM
multiply by actual number in cell CJ Cerezo Excel Worksheet Functions 3 November 29th 04 09:43 PM


All times are GMT +1. The time now is 08:34 PM.

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

About Us

"It's about Microsoft Excel"