I have a bar code scanner. I would like to know an easy way to scan the ISBN number format into excel. Any ideas?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Scanning ISBN into excel (Excel 2002)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Scanning ISBN into excel (Excel 2002)
- This topic has 14 replies, 3 voices, and was last updated 20 years, 1 month ago.
Viewing 0 reply threadsAuthorReplies-
WSsdckapr
AskWoody Lounger -
WSjolas
AskWoody LoungerApril 16, 2005 at 12:18 am #941327It seems that I did not make my question clear. I don’t want barcode inside the spreadsheet. I want to create a simple database of books wherein one of the field is an ISBN number (ex. 0-87120-855-5 in this format). Using the barcode scanner I would like to scan the barcode usually printed on the back of books and convert the scanned number into the ISBN format mentioned earlier. It could even be scanned in on an adjacent column and then automatically converted in the right format in the ISBN column with say a special formula, function or macro whatever works. TIA.
-
WSkieran
AskWoody Lounger -
WSjolas
AskWoody LoungerApril 16, 2005 at 1:16 am #941331Appreciate the quick response but it goes deeper than number formatting. At least in my situation when I use the barcode scanner with excel it will output a 13 digit number (as I understand it, the numbers are encoded using the EAN-13 bar code encoding). An EAN-13 check digit is added to the end of the bar code the ISBN part is always preceeded by the the first 3 digit ( which is always 978). To generate the ISBN format that I want is to take the 13 digits drop the first three – take the next nine digits and format it like 0-00000-000-N as for the N digit – it is taken from the 13th digit (the EAN-13 check digit) apply some formula to determine the last digit of the desired ISBN format.
Here is a link to give you more idea in case my explanation is not clear.
Appreciate the help.
-
WSsdckapr
AskWoody Lounger -
WSjolas
AskWoody LoungerApril 16, 2005 at 2:16 am #941334 -
WSsdckapr
AskWoody Lounger -
WSjolas
AskWoody LoungerApril 16, 2005 at 4:42 am #941339I guess it is a bit complicated because it does not follow a consistent format. This actually created additional consideration I don’t exactly know how to answer but I got around looking at the manual of my barcode scanner and the Howto FAQ on the scanner manufacturer’s website. And there it is the answer to my problem. By just scanning a bar code on the manual one can turn on and off the code conversion from ean to isbn but without the hypenation I desired. Just for information and those who may have the same dilemma my bar code scanner is from IDTECH Econoscan Bar code scanner. Steve I really appreciate the effort and your interest in helping find the solution. Thank you again for all those you responded.
-
WSsdckapr
AskWoody LoungerApril 16, 2005 at 10:25 am #941351I assume you no longer need the code?
If you need the hyphenation and can provide the details on where they are placed, A user function can be created. A simple formula is not possible due to the check value. All but the check value could be obtained using a MID statement. The check value needs to do some math so either a megaformula is required or a custom function. WIth the Hyphenation a custom function is most likely the best solution.
It would not be difficult, if the “logic” for the hyphenation is given. If you find the logic and need the function post back and I can work something up for you.
Steve
-
WSjolas
AskWoody Lounger -
WSsdckapr
AskWoody Lounger -
WSsdckapr
AskWoody LoungerApril 17, 2005 at 4:20 pm #941563Test this code (add it to a module in the workbook), it should work for hyphenation of the English language ISBNs.
Option Explicit Function EAN2ISBN(sEAN As String) Dim iLang As String Dim iPub As Integer Dim iCheck As Integer Dim sDecode As String Dim sCheck As String Dim sTemp As String Dim i As Integer Dim iTotal As Integer sTemp = Mid(sEAN, 4, 9) iTotal = 0 For i = 1 To 9 iTotal = iTotal + _ Val(Mid(sTemp, i, 1)) * (11 - i) Next iCheck = 11 - iTotal Mod 11 Select Case iCheck Case 11 sCheck = "0" Case 10 sCheck = "X" Case Else sCheck = CStr(iCheck) End Select iLang = 1 Select Case Left(sTemp, 3) Case "000" To "019" iPub = 2 Case "020" To "069" iPub = 3 Case "070" To "084" iPub = 4 Case "085" To "089" iPub = 5 Case "090" To "094" iPub = 6 Case "095" To "099" iPub = 7 Case Else Select Case Left(sTemp, 5) Case "15500" To "18697" iPub = 5 Case "18698" To "19989" iPub = 6 Case "19990" To "19999" iPub = 7 Case Else iLang = 0 End Select End Select If iLang = 0 Then EAN2ISBN = sTemp Else EAN2ISBN = Left(sTemp, iLang) & "-" & _ Mid(sTemp, iLang + 1, iPub) & "-" & _ Mid(sTemp, iLang + iPub + 1) End If EAN2ISBN = EAN2ISBN & "-" & sCheck End Function
The logic was created from ISBN Frequently Asked Questions. The foreign ones will get no hyphens. It could be adapted if you get the logic for foreign hyhenations (I did not look very much for them).
To use it, if the EAN13 value is in A2, enter in a cell the formula
=ean2isbn(A2)
and will give the ISBN.
The logic is it extracts the 9 chars starting in postition #4. It loops thru them getting the value and multiplying it by the “weight” the difference of the mod 11 of from 11 is the “check value” if it is a 10 and “X” is used. If an 11 “0” is used.
After getting the check value, It marks the language as haveing 1 char and looks thru the cases for english. If none is found the ilang = 0 which is used to indicate not found so no hypens are added in the main section.
If it is found, the proper place is listed and then the hyphens are added. The check value is added at the end.
Steve
-
WSjolas
AskWoody Lounger -
WSsdckapr
AskWoody Lounger
-
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Xfinity home internet
by
MrJimPhelps
1 hour, 17 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
3 hours, 16 minutes ago -
Debian 12.11 released
by
Alex5723
11 hours, 42 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
15 hours, 24 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
1 hour, 46 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
11 hours, 52 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 8 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
22 hours, 44 minutes ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 10 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 3 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
10 hours, 48 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
3 hours, 39 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 20 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 16 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 6 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 10 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
18 hours, 23 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
7 hours, 1 minute ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 13 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 13 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 1 hour ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
2 days, 21 hours ago -
0Patch, where to begin
by
cassel23
2 days, 15 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 10 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
2 days, 22 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 19 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
3 days, 10 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
12 hours, 37 minutes ago -
Installer program can’t read my registry
by
Peobody
4 hours, 31 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
3 days, 8 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.