Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Excell Check Digit Formula

Ok guys..Any help would be great.. What i'm trying to accomplish here is. Creating a function and/or formula in Excell or access that will calculate the check digit value of a 20 digit number. I have seen several sites that have VB code on how to do..however I do not know how to incorporate vb code into a Ms Access db and make it do my requested task...

ie... http://www.makebarcode.com/info/appnote/app_003.html
http://www.excelbanter.com/q-t_19172...eck-Digit.html
http://www.freevbcode.com/ShowCode.Asp?ID=1035

ie... I have a field "barcodewithnocheckdigit" and an example value for that field is "8260212616630008000" The check digit sum for that figure is 9. I have 40,000 records. Is it possible to have this code/query calculate and update the check digit value field?

The instructions on calculating a check digit value are here :

http://www.uc-council.org/ean_ucc_sy.../cdc.html#SSCC


So I guess my question should be "how do I use this code in my database" Please keep in mind that I have no programming knowledge whatsoever...therefore I need step by step information pretty much..

Thank in advance for your help.
  #2   Report Post  
Ian
 
Posts: n/a
Default

Excel can not handle a 20 digit number. If you enter 11111111111111111111 it
returns 11111111111111100000 when formatted as a number with 0 decimal
places. To get round this you would need to split the number into 2 parts.
The easiest way would be 1st10 in one cell and last 10 in another (Assume A1
& B1). You can then use the following formula (eg in C1)

=10-(RIGHT(((LEFT(A1,1)+MID(A1,3,1)+MID(A1,5,1)+MID(A1 ,7,1)+MID(A1,9,1)+MID(B1,1,1)+MID(B1,3,1)+MID(B1,5 ,1)+MID(B1,7,1)+MID(B1,9,1))*3)+MID(A1,2,1)+MID(A1 ,4,1)+MID(A1,6,1)+MID(A1,8,1)+RIGHT(A1,1)+MID(B1,2 ,1)+MID(B1,4,1)+MID(B1,6,1)+MID(B1,8,1)+RIGHT(B1,1 ),1))

This formula should all be on 1 line.

BTW, your 20 digit number only had 19 digits. Adding an extra 0 at the end
gave the required result.
--
Ian
--
"tnelson" wrote in message
...

Ok guys..Any help would be great.. What i'm trying to accomplish here
is. Creating a function and/or formula in Excell or access that will
calculate the check digit value of a 20 digit number. I have seen
several sites that have VB code on how to do..however I do not know how
to incorporate vb code into a Ms Access db and make it do my requested
task...

ie... http://www.makebarcode.com/info/appnote/app_003.html
http://www.excelbanter.com/q-t_19172...eck-Digit.html
http://www.freevbcode.com/ShowCode.Asp?ID=1035

ie... I have a field "barcodewithnocheckdigit" and an example value
for that field is "8260212616630008000" The check digit sum for that
figure is 9. I have 40,000 records. Is it possible to have this
code/query calculate and update the check digit value field?

The instructions on calculating a check digit value are here :

http://tinyurl.com/joqy


So I guess my question should be "how do I use this code in my
database" Please keep in mind that I have no programming knowledge
whatsoever...therefore I need step by step information pretty much..

Thank in advance for your help.


--
tnelson



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
check a checkbox in a formula big t Excel Worksheet Functions 1 June 16th 05 06:32 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
can i register a digit in excell sheet cell Mr: beba Excel Discussion (Misc queries) 1 May 24th 05 10:43 AM
Excel should have a function to verify the check digit on UPC num. Brian S B Excel Discussion (Misc queries) 1 February 1st 05 08:27 PM
Creating Formula using check boxes Anthony Slater Excel Discussion (Misc queries) 3 January 4th 05 03:03 PM


All times are GMT +1. The time now is 07:58 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"