You need to add scannable barcodes or QR codes to your Excel sheet for inventory, tickets, or product labels. Excel does not have a built-in barcode font or generator. You must use external fonts or an add-in to create codes that scanners can read. This article shows you how to insert and format barcodes and QR codes for reliable printing.
Key Takeaways: Adding Barcodes and QR Codes to Excel
- Insert > Get Add-ins > QR4Office: Inserts a dynamic QR code image that updates when you change the linked cell value.
- Download and install a barcode font like Code 128: Lets you type text that appears as a scannable barcode after applying the font.
- Page Layout > Size and Print Area settings: Ensures your codes are correctly sized and positioned on the printed page.
How Barcodes and QR Codes Work in Excel
A barcode is a visual representation of data, often a number, that optical scanners can read. A QR code is a two-dimensional matrix barcode that can store more data, like web URLs. Excel itself cannot generate these as native images. You have two main approaches. The first method uses a specialized font. You type numbers into a cell, change the cell’s font to a barcode font like Code 128, and the characters transform into bars. The second method uses an add-in from the Office Store. This inserts a genuine image object into your sheet, which is more versatile for QR codes.
For printing, you must check the code’s size and print margins. Most barcode scanners need the code to be a specific physical size. A QR code image must have sufficient resolution so it does not appear pixelated on paper. Always test print a sample sheet and scan it with your device before printing a large batch.
Steps to Insert a Barcode Using a Font
This method is best for simple numeric barcodes like Code 128 or Code 39. You need to download and install the font on your Windows system first.
- Download a barcode font
Search for a free, reliable barcode font like “Code 128” or “Free 3 of 9”. Download the TrueType font file, which usually has a .ttf extension. - Install the font in Windows
Right-click the downloaded .ttf file and select Install. Alternatively, open the Windows Fonts settings dialog and drag the file into the window. The font is now available in Excel. - Enter your data in Excel
In a cell, type the number or code you want to encode. For some fonts like Code 128, you may need to add start/stop characters. Check the font’s documentation. - Apply the barcode font
Select the cell. Go to the Home tab. In the Font group, open the font dropdown and select the installed barcode font, like “Code128”. Increase the font size to at least 20 points for better scannability. - Adjust cell for printing
Select the cell. Go to Page Layout > Size. Set the height and width to ensure the barcode prints at the correct physical dimensions. Use Print Preview to check.
Steps to Insert a QR Code Using an Add-in
This method creates a standard image QR code that can link to a website or display text. The QR code can be linked to a cell so it updates automatically.
- Open the Office Add-ins store
In Excel, go to the Insert tab on the ribbon. Click the Get Add-ins button in the Add-ins group. This opens the Office Add-ins dialog. - Find and add a QR code generator
In the store, search for “QR4Office” or “QR Code”. Select the free add-in from the results and click Add. Accept the permissions prompt. - Generate the QR code
A task pane will open. In the Content field, type the text or URL for the QR code. You can also click the cell selector icon to link the QR code to a specific cell’s value. Click Insert QR Code. - Position and format the image
The QR code appears as an image on your sheet. Drag it to the desired location. Use the picture formatting handles to resize it. Ensure it is large enough to scan, typically at least 2 cm by 2 cm. - Set up the sheet for printing
Go to Page Layout > Page Setup. Define a print area that includes the QR code. Use the Margins settings to ensure the code is not cut off. Check the scale under Page > Scaling to make sure it prints at 100%.
Common Mistakes and Printing Problems
Barcode Does Not Scan After Printing
This usually happens because the barcode is too small, has low contrast, or is blurry. For font-based barcodes, increase the font size significantly. For image-based QR codes, ensure the image is high resolution. Print on a laser printer instead of an inkjet for sharper edges. Always verify the printed code with a scanner before final production.
QR Code Image Becomes Blurry When Resized
If you stretch a small QR code image, it will pixelate. Delete the blurry code. Reinsert it using the add-in, but make the content cell reference the final data first. Then resize the QR code by holding the Shift key and dragging a corner handle to scale it proportionally. Do not distort the square shape.
Barcode Font Shows Numbers, Not Bars
The cell format may be overriding the font. Select the cell, right-click, and choose Format Cells. Go to the Number tab and select Text as the category. Click OK. Reapply the barcode font. Also, confirm the font was installed correctly by checking for it in other applications like Word.
Barcode Font vs. QR Code Add-in: Key Differences
| Item | Barcode Font | QR Code Add-in |
|---|---|---|
| Data Type | Best for numbers and simple alphanumeric codes | Best for URLs, text strings, and vCard data |
| Format | Cell text that changes with font style | Inserted image object on the sheet |
| Dynamic Update | Updates automatically when cell content changes | Can be linked to a cell for automatic updates |
| Print Quality | Depends on font rendering and printer resolution | Depends on image resolution and scaling |
| Setup Required | Download and install font in Windows | Install add-in from Office Store once |
You can now add functional barcodes and QR codes to your Excel sheets. Use the font method for product SKUs and the add-in for website links. Test the Page Layout > Print Preview to confirm the layout. For advanced use, explore add-ins that generate Data Matrix or other 2D barcodes directly in Excel.