ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   conversion of book bar code to ISBN (https://www.excelbanter.com/excel-worksheet-functions/111932-conversion-book-bar-code-isbn.html)

GrahamBookman

conversion of book bar code to ISBN
 
Is there a formula or method that will convert the barcode printed on book
to the ISBN. - I can scan the barcode into Excel eg barcode is 9781585955565
and the ISBN is 158595556 - the last digit in the ISBN number is a checksum
digit, but I really need the ISBN.
thanks for any suggestions/advice


GrahamBookman

conversion of book bar code to ISBN
 
oops mistyped the ISBN should be 1585955566


"GrahamBookman" wrote in message
...
Is there a formula or method that will convert the barcode printed on book
to the ISBN. - I can scan the barcode into Excel eg barcode is
9781585955565 and the ISBN is 158595556 - the last digit in the ISBN
number is a checksum digit, but I really need the ISBN.
thanks for any suggestions/advice



barcodewiz

conversion of book bar code to ISBN
 
Graham,

You can use the function below. It accepts a 13 digit EAN13 number
(the barcode number) and returns an ISBN.

Public Function EAN13ToISBN(c As String) As String
If Len(c) < 13 Or Not IsNumeric(c) Then Exit Function

Dim isbn As String
isbn = Mid(c, 4, 9)

Dim i As Integer
Dim total As Long
For i = 1 To 9
total = total + i * Int(Mid(isbn, i, 1))
Next i

Dim cd As Integer
cd = total Mod 11

If cd = 10 Then
EAN13ToISBN = isbn & "X"
Else
EAN13ToISBN = isbn & cd
End If
End Function


Alek Szymanski
http://www.barcodewiz.com

GrahamBookman wrote:
Is there a formula or method that will convert the barcode printed on book
to the ISBN. - I can scan the barcode into Excel eg barcode is 9781585955565
and the ISBN is 158595556 - the last digit in the ISBN number is a checksum
digit, but I really need the ISBN.
thanks for any suggestions/advice



Roger Govier

conversion of book bar code to ISBN
 
Hi Graham

try
=MID(A1,4,10)

--
Regards

Roger Govier


"GrahamBookman" wrote in message
...
oops mistyped the ISBN should be 1585955566


"GrahamBookman" wrote in message
...
Is there a formula or method that will convert the barcode printed on
book to the ISBN. - I can scan the barcode into Excel eg barcode is
9781585955565 and the ISBN is 158595556 - the last digit in the ISBN
number is a checksum digit, but I really need the ISBN.
thanks for any suggestions/advice





GrahamBookman

conversion of book bar code to ISBN
 
thanks so much G.
"barcodewiz" wrote in message
oups.com...
Graham,

You can use the function below. It accepts a 13 digit EAN13 number
(the barcode number) and returns an ISBN.

Public Function EAN13ToISBN(c As String) As String
If Len(c) < 13 Or Not IsNumeric(c) Then Exit Function

Dim isbn As String
isbn = Mid(c, 4, 9)

Dim i As Integer
Dim total As Long
For i = 1 To 9
total = total + i * Int(Mid(isbn, i, 1))
Next i

Dim cd As Integer
cd = total Mod 11

If cd = 10 Then
EAN13ToISBN = isbn & "X"
Else
EAN13ToISBN = isbn & cd
End If
End Function


Alek Szymanski
http://www.barcodewiz.com

GrahamBookman wrote:
Is there a formula or method that will convert the barcode printed on
book
to the ISBN. - I can scan the barcode into Excel eg barcode is
9781585955565
and the ISBN is 158595556 - the last digit in the ISBN number is a
checksum
digit, but I really need the ISBN.
thanks for any suggestions/advice




straw00berry

Sounds to be an interesting topic to me. I've been working with something like the vb.net barcode reader for not short a time. However, I never imagined such kind of things.


All times are GMT +1. The time now is 05:30 AM.

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