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: 290
Default Check Digit:- A Real Challenge!

Hi all

I know that this is really way out of my league, I would love for
someone to come up with some code to check if a number is valid using
the check digit method I will paste below. (a 7 digit number which
really should be a 6 digit number with the 7th being the check digit)

I can just about work it out using a spreadsheet with loads of formulas
dotted about but would have a clue how to code something to check a
number according to this method.

Hope someone can help

Regards

Duncan

(see below for method)

The check digit is at the end of the number (7 digit number).

The check digit is calculated from the base number as follows: (base
number is first 6 digits)

Multiply digit 1 of the base number by 13,
digit 2 by 11,
digit 3 by 7,
digit 4 by 5,
digit 5 by 3,
digit 6 by 2

and add the results of these multiplications together

Divide the overall sum above by 11 and obtain the remainder.

Subtract the remainder from 11 to give the check digit.

If the check digit value is 11, change it to 0.
If the check digit value is 10, add 1 to the base number and repeat the
process.

Suffix the check digit to the base number to give the registration
number.

Note that with this in place, there will obviously be a 1 in 10 chance
of entering a 'valid' number which won't necessarily be correct.

 
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
Real Data Formatting Challenge Pat Excel Discussion (Misc queries) 3 November 25th 08 07:51 PM
Challenge with spell check with multiple worksheets Giggly4g Excel Discussion (Misc queries) 0 July 11th 07 10:42 PM
A real challenge for you!! mevetts Excel Discussion (Misc queries) 27 January 11th 06 08:47 PM
A challenge for a real Excel Expert (Bob Phillips for instance) SANCAKLI Excel Discussion (Misc queries) 2 November 10th 05 03:56 PM
A real challenge...can anyone solve this !??!? Bob Excel Programming 5 November 5th 03 03:49 PM


All times are GMT +1. The time now is 10:47 AM.

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"