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, 2 months 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
-
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
33 minutes ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
1 hour, 39 minutes ago -
Disengage Bitlocker
by
CWBillow
3 hours, 2 minutes ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
3 hours, 38 minutes ago -
New Win 11 Pro Geekom Setup questions
by
Deo
5 hours, 22 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
10 hours, 54 minutes ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
10 hours, 55 minutes ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
14 hours, 50 minutes ago -
New PC transfer program recommendations?
by
DaveBoston
5 hours, 11 minutes ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
18 hours, 55 minutes ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
18 hours, 56 minutes ago -
Best tools for upgrading a Windows 10 to an 11
by
Susan Bradley
7 hours, 15 minutes ago -
The end of Windows 10 is approaching, consider Linux and LibreOffice
by
Alex5723
4 hours, 37 minutes ago -
Extended Windows Built-in Disk Cleanup Utility
by
bbearren
17 hours, 5 minutes ago -
Win 11 24H2 June 2025 Update breaks WIFI
by
dportenlanger
1 day, 13 hours ago -
Update from WinPro 10 v. 1511 on T460p?
by
CatoRenasci
11 hours, 49 minutes ago -
System Restore and Updates Paused
by
veteran
1 day, 16 hours ago -
Windows 10/11 clock app
by
Kathy Stevens
1 day, 3 hours ago -
Turn off right-click draw
by
Charles Billow
1 day, 19 hours ago -
Introducing ChromeOS M137 to The Stable Channel
by
Alex5723
1 day, 23 hours ago -
Brian Wilson (The Beach Boys) R.I.P
by
Alex5723
17 hours, 4 minutes ago -
Master patch listing for June 10, 2025
by
Susan Bradley
2 days ago -
Suggestions for New All in One Printer and a Photo Printer Windows 10
by
Win7and10
1 day, 3 hours ago -
Purchasing New Printer. Uninstall old Printer Software First?
by
Win7and10
2 days, 6 hours ago -
KB5060842 Issue (Minor)
by
AC641
18 hours, 54 minutes ago -
EchoLeak : Zero Click M365 Copilot leak sensitive information
by
Alex5723
2 days, 13 hours ago -
24H2 may not be offered June updates
by
Susan Bradley
1 day, 6 hours ago -
Acronis : Tracking Chaos RAT’s evolution (Windows, Linux)
by
Alex5723
3 days, 2 hours ago -
June 2025 updates are out
by
Susan Bradley
7 hours, 54 minutes ago -
Mozilla shutting Deep Fake Detector
by
Alex5723
3 days, 17 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.