LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Generating vailid check digits

working on project to generate numbers that contain valid check digit
based on the following:

user types a number in to a cell (right most digit is check digit and
is labeled position 1)

the check digit is generated this way:

Step (1) starting from position 2 (and working leftward), add the
values in the even numbered positions

Step (2) Multiply the result of step 1 by 3

Step (3) Starting from position 3, add up the values in the
odd-numbered positions, skipping position 1 because it's the location
of the check digit

Step (4) Add up the results for steps 2 and 3

Step (5) The check digit is the smallest number which, added to the
result in Step 4, gives a multiple of 10

Now, my problem is that I want to be able generate a list of 10 valid
numbers based on what the user inputs into a cell..

For example, user inputs "65432105"
(5 is the check digit: ((6+4+2+0)*3) + (5+3+1)) = 45 ; 45 + 5 = 50
which is mult of 10, so 5 is valid check digit)

I need to list 10 other sequential numbers with valid check digits:

example: 65432112, 65432129,...,65432204

Also the user can input any size number (I don't need to veriy the
check digit of the input number)

any help appreciated.
 
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
VBA write macro change column with 3 number digits to 4 digits the James C[_2_] Excel Discussion (Misc queries) 3 January 25th 10 03:12 PM
How to get excel to check last 2 digits in a 4 digit number realtorpete Excel Discussion (Misc queries) 3 January 4th 09 08:52 PM
How to calculate the UPC Check Digits David Excel Worksheet Functions 4 May 24th 07 07:23 PM
Barcode Check Digits Doug B Excel Worksheet Functions 3 February 5th 07 05:16 PM
ISBN Check Digits Colin Vicary Excel Discussion (Misc queries) 3 August 12th 05 04:12 PM


All times are GMT +1. The time now is 04:14 AM.

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"