MOD 10 Check Digit Formula

indeegirl

New Member
Joined
Feb 20, 2011
Messages
12
Hi! I hope someone can help me out! I am a graphic designer, and I am designing a statement for an insurance company. They have a slip that needs a MOD 10 Check Digit scan line with a weight of 2 1 at the bottom of the payment slip. The customer provides me with a .csv file with the following column titles that need to be converted to this scan line. The position is the placement in the scan line.

Position Description
1-10 ACCT_ID
11-13 Blank
14-21 INV_DATE Date (yyyymoda format, however the data comes to me as 1/8/2011)
22-25 PLAN_ID
26 CREDIT_AMT AND DEBIT_AMT
27-32 AMT_DUE
33 Check Digit* Will be generated by all of these numbers


The resulting scan line should look like (the following the # means space, I don't need the actual symbol there):
1000143400###20091201000000045801

I am using XMPie, a variable data software to make the statement, so I need excel to formulate this code, so I can map it into my document. Another thing, is the date format I receive is wrong, compared to how it is needed in the Scanline. Will I need to change that before generating the code? This project has got me baffled, and the more I try the crazier it seems. If someone has any ideas, I would be forever in your debt:) The customer wants this project to go live March 3rd, and I have been working on this for a month!! If you can help, I would be able to email you the statement, the execl file and whatever else you need!!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Welcome to MrExcel board...

ok without seeing a sample of your data, not sure I can help, but the data issue can be solved by using
=text(b2,"yyyymmdd")
changing the reference of B2 to where your data is stored.
 
Upvote 0
Thanks for the quick response! I will try that with my date. Could I email you the sample data? For some reason, I can't send attachments on here.
 
Upvote 0
no attachments are not allowed. You can post samples with different methods. See the - Posting guidelines, forum rules and terms of use


here is a sample using code that can be received by posting a PM to Richard Schollar

Excel Workbook
AB
241/15/2011my date 40558
25my date 20110115
Sheet2
Excel 2003
Cell Formulas
RangeFormula
B24="my date "&A24
B25="my date "&TEXT(A24,"yyyymmdd")
 
Upvote 0
Excel Workbook
ABCDEF
1INV_DATEACCT_IDPLAN_IDAMT_DUECREDIT_AMTDEBIT_AMT
22011010811677497008389.780-1948.9
3201101081112547300102048.810-650.94
42011010811233012007-55.280-649.76
520110108111046400010.010-612.9
620110108111046400010.01-612.90
Sheet1
Excel 2010


Here we go! My actual spreadsheet is larger (this wouldn't let me do the whole thing) the actual columns above are as follows:
INV_DATE = C (This will include the formula you just sent me)
ACCT_ID = K
PLAN_ID = M
AMT_DUE = W
DEBIT_AMT =AD
CREDIT_AMT = AC

A couple of other issues I am having is the PLAN_ID should be 3 digits, it is dropping the leading zeros. So it should be 008, 010, 007, 001, 001 and
the ACCT_ID does not include the last two zeros on the file above, I just typed them in. Can I fix these problems?

Is it possible to make a formula/macro for this mess? Thanks SOO much!!!!
 
Upvote 0
if you are importing the data, you need to mark the data as text where you have leading zeros (plan_id)
 
Upvote 0
to concatenate the data use this
Excel Workbook
ABCDEF
1INV_DATEACCT_IDPLAN_IDAMT_DUECREDIT_AMTDEBIT_AMT
21/8/201111677497008389.780-1948.9
31/8/20111112547300102048.810-650.94
41/8/201111233012007-55.280-649.76
51/8/2011111046400010.010-612.9
61/8/2011111046400010.01-612.90
7
8
9201101081167749700008389.780-1948.9
Sheet3
Excel 2003
Cell Formulas
RangeFormula
A9=TEXT(A2,"yyyymmdd")&B2&TEXT(C2,"000")&D2&E2&F2
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top