Tellsheet
HomeExcel Guides › Validate a Barcode Check Digit in Excel

How to Validate a Barcode or ISBN Check Digit in Excel

A single mistyped digit in a product code or ISBN causes a mis-scan or a wrong order. The last digit of EAN-13, UPC-A and ISBN codes is a check digit calculated from the rest — so you can catch errors before they cost you. Here's how.

Last updated: August 2026

CodeValid?
4006381333931Valid
4006381333930Invalid
978-0-306-40615-7Valid

Method 1 — a check-digit formula

For EAN-13, the first 12 digits are weighted 1, 3, 1, 3… and the check digit is (10 − MOD(sum,10)) MOD 10. In Excel that becomes a SUMPRODUCT over MID extractions compared to the 13th digit — workable, but you need a different formula per format (UPC-A weights 3/1; ISBN-10 is modulo-11 with X = 10), and it's easy to get the weighting order wrong.

Method 2 — a lookup or macro

Some teams keep a VBA function per symbology. It works, but macros are blocked in many environments and don't port to Excel for the web.

The 1-click way — Tellsheet

Check-Digit Validator verifies the check digit on a column of codes and adds a Valid? column flagging each row. It handles EAN-13, UPC-A, ISBN-13 and ISBN-10 (including a trailing X), auto-detects the format by length, and tolerates spaces and hyphens. No per-format formula, no macro. Previews first and is revertable. Pairs with Barcode and Validate Data.

Frequently asked questions

How do I check if a barcode is valid?

Recompute its check digit with per-format formulas, or use Tellsheet's Check-Digit Validator for a Valid? column in one click.

What is a check digit?

The last digit, derived from the others; a mistype usually makes it mismatch, which is how errors are caught.

Does it handle ISBN-10 X?

Yes — the modulo-11 check value 10 is written X, and it's validated correctly.

Which formats are supported?

EAN-13, UPC-A, ISBN-13 and ISBN-10, auto-detected by length or pinned.

Related Excel guides

Catch a mistyped code before it ships

Check-Digit Validator flags every invalid EAN, UPC, or ISBN — right inside Excel.

Get Tellsheet free See pricing