How to Create a Barcode in Excel: Methods, Tools, and What to Know First
Barcodes might seem like something that belongs on a warehouse shelf or a retail checkout counter, but they're genuinely useful in spreadsheets too — for inventory tracking, asset management, event check-ins, and more. Excel doesn't generate barcodes natively, but there are several reliable ways to get there, and each comes with its own trade-offs depending on your setup and goals.
What a Barcode Actually Is (In Spreadsheet Terms)
A barcode is a visual representation of data — usually numbers or text — that a scanner or camera can read optically. When you "create a barcode in Excel," you're essentially encoding a cell's value into a visual symbol that can be printed or scanned.
The two main barcode families you'll encounter:
- 1D barcodes (linear): Stripes of varying widths. Common formats include Code 128, Code 39, and EAN-13. These are what you see on grocery items and shipping labels.
- 2D barcodes: Grid-based patterns that hold significantly more data. QR codes are the most familiar example. Data Matrix is another common one used in manufacturing.
Which format you need matters before you pick a creation method — because not every method supports every barcode type.
Method 1: Using a Barcode Font 🖨️
This is the most commonly used approach for 1D barcodes in Excel, and it requires no add-ins or external tools — just a compatible font installed on your system.
How it works:
Barcode fonts like Code 39 (also called "3 of 9") and Code 128 render specific characters as barcode stripes when applied to a cell. You type a value, apply the font, and Excel displays it as a scannable barcode.
Steps for Code 39 (the simplest starting point):
- Download and install a Code 39 barcode font (many are available free for personal/commercial use — verify licensing before deploying commercially).
- Open your Excel spreadsheet.
- In a helper column, wrap your source value with asterisks:
="*"&A2&"*"— Code 39 requires start/stop characters, and the asterisk serves that role. - Select the helper column cells.
- Change the font to your installed Code 39 font.
- Resize the row height and column width so the bars aren't compressed.
What to watch for:
- Code 39 only supports uppercase letters, digits 0–9, and a handful of special characters. If your data includes lowercase or extended characters, you'll need Code 128, which requires a more complex formula to encode characters correctly before applying the font.
- Barcode fonts are device-dependent. If you share the file with someone who doesn't have the font installed, they'll see plain text instead of a barcode. This is a real limitation for shared workbooks.
Method 2: Using an Excel Barcode Add-In
Several third-party add-ins integrate directly into Excel and handle the encoding logic for you — including support for more complex formats like Code 128, QR codes, EAN-13, and UPC-A.
How this works:
Once installed, these add-ins typically add a new ribbon menu or formula function. You select a cell, choose a barcode type, and the add-in generates the barcode as an image object embedded in your sheet.
Advantages over fonts:
| Feature | Font Method | Add-In Method |
|---|---|---|
| Setup complexity | Low (install font) | Medium (install add-in) |
| Barcode types supported | Limited (1D mainly) | Wide (1D and 2D) |
| Portability | Poor (font-dependent) | Better (image embedded) |
| Formula automation | Manual wrapping | Often automated |
| Cost | Usually free | Varies (free to paid) |
Add-ins vary significantly in quality, supported formats, and how they handle bulk generation across large datasets. Some embed static images; others update dynamically when cell values change.
Method 3: Generating Barcodes Externally and Importing
For one-off needs or when format flexibility matters, you can generate barcode images using an external tool or web-based generator and import them into Excel as images.
Practical workflow:
- Use an online barcode generator (inputting your data and selecting format).
- Download the barcode as a PNG or SVG.
- In Excel: Insert → Pictures → This Device, then position it near the relevant row or cell.
This method is straightforward but doesn't scale well. For a handful of barcodes it's fine; for hundreds of SKUs or assets, it becomes impractical quickly.
Method 4: VBA Automation for Bulk Barcode Creation
If you're comfortable with Excel's built-in scripting environment, Visual Basic for Applications (VBA) can automate barcode generation across large datasets — typically by looping through rows, calling a barcode font formula or an external API, and placing results programmatically.
This approach is best suited to users who:
- Need to generate barcodes at scale (hundreds or thousands)
- Want the process repeatable without manual steps
- Are comfortable editing or adapting VBA scripts
VBA macros also allow you to trigger regeneration when source data changes, which static font methods or imported images can't do on their own. 🔧
The Variables That Shape Your Approach
The "right" method isn't universal — it shifts based on several real factors:
- Barcode type required: Code 39 and Code 128 for linear; QR or Data Matrix for 2D. Your scanner or receiving system may mandate a specific format.
- Volume: A few barcodes vs. thousands changes the viable options significantly.
- Who uses the file: Shared workbooks with users on different machines make font-based methods unreliable.
- Excel version and OS: Some add-ins are Windows-only; Mac users running Excel may find compatibility limited.
- Scanability requirements: Printed barcodes need sufficient resolution and quiet zones (blank margins around the barcode). Screen-displayed barcodes have different constraints.
- Data complexity: Simple numeric data works with basic fonts; alphanumeric or extended character sets need more robust encoding.
Whether you're tagging assets in a small office, managing inventory in a warehouse, or building a check-in system for an event, those specifics determine which of these methods will actually hold up under real-world use.