This tutorial demonstrates how to create barcodes in Excel and Google Sheets.
In Excel, you can format cells as barcodes which can be very useful, especially in inventory management. For example, you can create a product catalog with all barcodes, print product UPC codes, or track items easily. To use barcodes in Excel, you need a barcode font installed. Code 39 is the most frequently used font. To download it, follow these steps:
- You can download Code 39 from several sources. Try this one.
- After opening this link, choose Code 39 on the page and click the Download button.
- The font is downloaded as a ZIP folder to your Downloads. Unzip it to get the TTF (true to font) file.
- Then, double-click the TTF file. You can see a preview of the font.
- To install the barcode font, in the Font Preview window, click Install.
As a result, the barcode font is installed on your computer. To see it listed in your fonts, you may need to reopen Excel.
- Once you have a barcode font installed, you are ready to create barcodes from a list of numbers. For example, see the list below in Column A. Let’s create barcodes from those numbers in Column B. First, be sure that all values from Column A are formatted as text, in order to avoid numbers being condensed.
- To format values from Column A, select those cells and in the Ribbon, go to Home > Number. Choose Text from the drop down.
(If you skip this step, Excel omits leading zeros, or shortens large numbers.)
- Now, copy the values from Column A to Column B. To do that, in cell B2 enter =A2 and then, drag the formula down to the last populated cell in the column (B6).
- Then, select all cells with values in Column B (B2:B6) and in the Ribbon, go to Home > Font. Choose Code 39 from the drop down.
- Now all values in Column B are formatted as barcodes. Make barcodes more visible by increasing the font size.
You may already have the values you need for your barcodes. If not, consider using the RAND Function or Rnd in VBA to generate random numbers. Or, start with a string of numbers at the desired length and generate all permutations.
Barcodes in Google Sheets
In Google Sheets, you can create barcodes exactly the same way. Once you install the font, it’s also available in Google Sheets under the name Libre Barcode 39.