ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Creating a Check Digit (https://www.excelbanter.com/charts-charting-excel/58549-creating-check-digit.html)

Ilan

Creating a Check Digit
 
Please help!

I'm trying to create a check digit using an existing string of 20 numbers.
The calculation of this digit must follow this method
1. All even numbers added together
2. All odd numbers added together and multiplied by 3
3. These two results need to be added together
4. Take the last digit of the result in 3 and subtract 10 (The result needs
to be a single check digit between 0 & 9)

EG. 01248120470000003001, results in a check digit of 9

There may be up to a million of these strings of numbers!

My question is can this task be performed using one equation? I have split
it up into sections to keep it simple for now, but I am stuck on section 4.

Any help much appreciated...many thanks in advance

Ilan

Jerry W. Lewis

Creating a Check Digit
 
=MOD(SUM(IF(MOD(MID(string,ROW(A1:A20),1),2),3,1)* MID(string,ROW(A1:A20),1)),10)

Array entered (Ctrl-Shift-Enter). I don't see what this has to do with
charting.

Jerry

Ilan wrote:

Please help!

I'm trying to create a check digit using an existing string of 20 numbers.
The calculation of this digit must follow this method
1. All even numbers added together
2. All odd numbers added together and multiplied by 3
3. These two results need to be added together
4. Take the last digit of the result in 3 and subtract 10 (The result needs
to be a single check digit between 0 & 9)

EG. 01248120470000003001, results in a check digit of 9

There may be up to a million of these strings of numbers!

My question is can this task be performed using one equation? I have split
it up into sections to keep it simple for now, but I am stuck on section 4.

Any help much appreciated...many thanks in advance

Ilan




All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com