Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Calculating a Check Digit Routine

I have the following formula that is used to calculate a MOD 10 check digit
routine. For example: If I entered (8 digits) 45678912 in cell A1, the
formula would return a 2 as the 9th digit.

This is the formula that I am using but did not write so I'm having trouble
following it.
=10-MOD(SUM(--MID(TEXT($A1,"000000000"),{2,4,6,8},1),--RIGHT(MID(TEXT($A1,"000000000"),{1,3,5,7,9},1)*2),--LEFT(TEXT((MID(TEXT($A1,"000000000"),{1,3,5,7,9},1 )*2),"00"))),10)

I need to modify this formula so that it will look at 15 digits and
calculate the 16th. I've tried multiple things but have had no luck. Any
suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Calculating a Check Digit Routine

See this:

http://www.google.com/search?hl=en&s... aq=f&oq=&aqi=

--
Biff
Microsoft Excel MVP


"rojobrown" wrote in message
...
I have the following formula that is used to calculate a MOD 10 check digit
routine. For example: If I entered (8 digits) 45678912 in cell A1, the
formula would return a 2 as the 9th digit.

This is the formula that I am using but did not write so I'm having
trouble
following it.
=10-MOD(SUM(--MID(TEXT($A1,"000000000"),{2,4,6,8},1),--RIGHT(MID(TEXT($A1,"000000000"),{1,3,5,7,9},1)*2),--LEFT(TEXT((MID(TEXT($A1,"000000000"),{1,3,5,7,9},1 )*2),"00"))),10)

I need to modify this formula so that it will look at 15 digits and
calculate the 16th. I've tried multiple things but have had no luck. Any
suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calculating a Check Digit Routine

On Oct 29, 9:11*pm, "T. Valko" wrote:
See this:

http://www.google.com/search?hl=en&s...d+10+check+dig...

--
Biff
Microsoft Excel MVP

"rojobrown" wrote in message

...



I have the following formula that is used to calculate a MOD 10 check digit
routine. *For example: If I entered (8 digits) 45678912 in cell A1, the
formula would return a 2 as the 9th digit.


This is the formula that I am using but did not write so I'm having
trouble
following it.
=10-MOD(SUM(--MID(TEXT($A1,"000000000"),{2,4,6,8},1),--RIGHT(MID(TEXT($A1,"*000000000"),{1,3,5,7,9},1)*2) ,--LEFT(TEXT((MID(TEXT($A1,"000000000"),{1,3,5*,7,9}, 1)*2),"00"))),10)


I need to modify this formula so that it will look at *15 digits and
calculate the 16th. *I've tried multiple things but have had no luck. Any
suggestions?- Hide quoted text -


- Show quoted text -


Your formula will return 10 in some instances, presumably that should
be zero. This formula should return the same results as yours (that
one anomaly apart) for 8 digit numbers....and also works for any
number of digits. Try for 15 and see if it works as you expect.......

=MOD(SUMPRODUCT(-MID(TEXT(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)*(MO D
(ROW(INDIRECT("1:"&LEN(A1)))+LEN(A1)+1,2)+1),"00") ,{1,2},1)),10)

or specifically for 15 digits....

=MOD(SUMPRODUCT(-MID(TEXT(MID(A1,{1;2;3;4;5;6;7;8;9;10;11;12;13;14; 15},
1)*{2;1;2;1;2;1;2;1;2;1;2;1;2;1;2},"00"),{1,2},1)) ,10)

regards, barry

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Calculating a Check Digit Routine

I was wondering what ever happened to "daddylonglegs" that used to post
those amazing date formulas!

--
Biff
Microsoft Excel MVP


"barry houdini" wrote in message
...
On Oct 29, 9:11 pm, "T. Valko" wrote:
See this:

http://www.google.com/search?hl=en&s...d+10+check+dig...

--
Biff
Microsoft Excel MVP

"rojobrown" wrote in message

...



I have the following formula that is used to calculate a MOD 10 check
digit
routine. For example: If I entered (8 digits) 45678912 in cell A1, the
formula would return a 2 as the 9th digit.


This is the formula that I am using but did not write so I'm having
trouble
following it.
=10-MOD(SUM(--MID(TEXT($A1,"000000000"),{2,4,6,8},1),--RIGHT(MID(TEXT($A1,"*000000000"),{1,3,5,7,9},1)*2) ,--LEFT(TEXT((MID(TEXT($A1,"000000000"),{1,3,5*,7,9}, 1)*2),"00"))),10)


I need to modify this formula so that it will look at 15 digits and
calculate the 16th. I've tried multiple things but have had no luck. Any
suggestions?- Hide quoted text -


- Show quoted text -


Your formula will return 10 in some instances, presumably that should
be zero. This formula should return the same results as yours (that
one anomaly apart) for 8 digit numbers....and also works for any
number of digits. Try for 15 and see if it works as you expect.......

=MOD(SUMPRODUCT(-MID(TEXT(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)*(MO D
(ROW(INDIRECT("1:"&LEN(A1)))+LEN(A1)+1,2)+1),"00") ,{1,2},1)),10)

or specifically for 15 digits....

=MOD(SUMPRODUCT(-MID(TEXT(MID(A1,{1;2;3;4;5;6;7;8;9;10;11;12;13;14; 15},
1)*{2;1;2;1;2;1;2;1;2;1;2;1;2;1;2},"00"),{1,2},1)) ,10)

regards, barry


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calculating a Check Digit Routine

On Oct 29, 10:39*pm, "T. Valko" wrote:
I was wondering what ever happened to "daddylonglegs" that used to post
those amazing date formulas!


Hello Biff,

daddylonglegs was my excelforum "alter ego" - he's still going strong
over there - but I'm gonna be barry from now on everywhere else....
(except perhaps the email address)..it's too much trouble keeping BOTH
egos in check....

regards, barry



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
GTIN-12 Check digit calculator Carim Excel Discussion (Misc queries) 0 November 1st 06 09:07 AM
Removing a check digit cwd58 Excel Discussion (Misc queries) 3 June 22nd 06 06:07 PM
Creating a Check Digit Ilan Charts and Charting in Excel 1 December 3rd 05 12:43 PM
Mod-10 Check Digit Union70 Excel Worksheet Functions 1 March 24th 05 11:35 PM
Mod-10 Check Digit Union70 Excel Worksheet Functions 4 March 8th 05 07:58 AM


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