Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
check a checkbox in a formula | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
can i register a digit in excell sheet cell | Excel Discussion (Misc queries) | |||
Excel should have a function to verify the check digit on UPC num. | Excel Discussion (Misc queries) | |||
Creating Formula using check boxes | Excel Discussion (Misc queries) |