#1   Report Post  
Colin Vicary
 
Posts: n/a
Default ISBN Check Digits


Hi everyone

I've googled without any luck!

I want to use a function to test that the user has entered a "correct"
ISBN by validating the check digit.

I want to use
=if(right(a1)<(11-MOD(SUMPRODUCT(MID(A1,ROW(INDIRECT("1:9")),1)*{10; 9;8;7;6;5;4;3;2}),11)),"Invalid","")
but every possible last digit give the result "invalid".

To complicate matters further in some cases the result of the original
function could be 11 which is transalted into "X" on a book. How would
I need to change my formula to cope with that?

Thanks

Colin


--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile: http://www.excelforum.com/member.php...o&userid=10472
View this thread: http://www.excelforum.com/showthread...hreadid=395037

  #2   Report Post  
Bernard Liengme
 
Posts: n/a
Default

My ISBN is in cell B4. The checkdigit is 11-mod(sumproduct(9 first digits),
but if this computes to 11 then the checkdigit is 0; if it computes to 10
the ISBN ends with X.
It's a long formula but it seems to work:
=IF(AND(RIGHT(B4)="x",
11-MOD(SUMPRODUCT(VALUE(MID(B4,ROW(A1:A9),1)),{10;9;8 ;7;6;5;4;3;2}),11)=10),"valid",IF(IF(MOD(SUMPRODUC T(VALUE(MID(B4,ROW(A1:A9),1)),{10;9;8;7;6;5;4;3;2} ),11)=0,0,11-MOD(SUMPRODUCT(VALUE(MID(B4,ROW(A1:A9),1)),{10;9;8 ;7;6;5;4;3;2}),11))=VALUE(RIGHT(B4)),"valid","inva lid"))

Since (1) we wish to retain leading zeros and (2) an ISBN might end in X, I
treat the ISBN as text. So unless it ends with X, I enter it with leading
apostrophe.
Some values to try it out
075065614x
0750656131
8441515530




best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


"Colin Vicary"
wrote in message
news:Colin.Vicary.1tm0ic_1123779908.0847@excelforu m-nospam.com...

Hi everyone

I've googled without any luck!

I want to use a function to test that the user has entered a "correct"
ISBN by validating the check digit.

I want to use
=if(right(a1)<(11-MOD(SUMPRODUCT(MID(A1,ROW(INDIRECT("1:9")),1)*{10; 9;8;7;6;5;4;3;2}),11)),"Invalid","")
but every possible last digit give the result "invalid".

To complicate matters further in some cases the result of the original
function could be 11 which is transalted into "X" on a book. How would
I need to change my formula to cope with that?

Thanks

Colin


--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile:
http://www.excelforum.com/member.php...o&userid=10472
View this thread: http://www.excelforum.com/showthread...hreadid=395037



  #3   Report Post  
Colin Vicary
 
Posts: n/a
Default


Hi Dr. Bernard and thanks for your help, that worked perfectly!

BTW, I checked the first two ISBNs on our database (I work for a UK
book wholesaler).

Thought you might like to know that we've sold almost 350 copies in
total of those two ISBNs - couldn't find the third one though!

Thanks again

Colin


--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile: http://www.excelforum.com/member.php...o&userid=10472
View this thread: http://www.excelforum.com/showthread...hreadid=395037

  #4   Report Post  
Bernard Liengme
 
Posts: n/a
Default

The third one is a Polish translation!
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Colin Vicary"
wrote in message
news:Colin.Vicary.1tn66g_1123833911.0337@excelforu m-nospam.com...

Hi Dr. Bernard and thanks for your help, that worked perfectly!

BTW, I checked the first two ISBNs on our database (I work for a UK
book wholesaler).

Thought you might like to know that we've sold almost 350 copies in
total of those two ISBNs - couldn't find the third one though!

Thanks again

Colin


--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile:
http://www.excelforum.com/member.php...o&userid=10472
View this thread: http://www.excelforum.com/showthread...hreadid=395037



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
Mod 10 & 11 Pablo Excel Worksheet Functions 13 August 10th 05 11:39 AM
How do I use a check box to accept a calculation Joejoethecrackman Excel Discussion (Misc queries) 5 March 22nd 05 08:47 PM
Least number of digits in Y-axis labels Charley Kyd Charts and Charting in Excel 9 February 6th 05 03:03 PM
Auto spell check as in word NC Excel Discussion (Misc queries) 2 January 27th 05 05:43 PM
Creating a check box that does not require security clearance. Maverick2U Excel Worksheet Functions 6 December 14th 04 02:46 AM


All times are GMT +1. The time now is 09:03 PM.

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"