How to create barcode in Excel

December 11, 2021

This is a step-by-step guide on how to create a barcode in Excel. Generating barcodes takes only a few steps, but you will need to download and install a free barcode font. The alternative would be to use Excel barcode add-ins.

You can download the Excel spreadsheet I've used when making this tutorial.

How to generate barcodes in Excel

If you want to create a barcode in Excel that any barcode scanner can recognize, follow the steps described below.

Step 1: Download and install the barcode font Libre Barcode 39.

If you prefer a two-row barcode, you can use Libre Barcode 39 Text (this also includes the text under the barcode). If you haven't installed fonts before, read this tutorial from Microsoft.

Note: Other barcode fonts are available online, but I prefer to use Google Fonts. Feel free to do your research and choose the one that best fits your project.

Step 2: Launch Excel and create a blank spreadsheet.

Step 3: Create two columns named Code and Barcode.

Create two columns named Code and Barcode.

The Code column will store the alphanumeric data, which is used to generate the barcode. The Barcode column will contain the actual barcodes.

Step 4: Format the cells in the Code column as Text.

Right-click on any selected cells and choose Format Cells.

To convert cell format to Text, select the Code column, right-click on it, and select Format Cells.

Change the format to Text to properly generate the barcodes.

From the Format Cells dialog box, select the Text format, and click OK.

Note: This step is needed to prevent Excel from removing leading zeros from your codes.

Step 5: Enter the formula ="*"&B3&"*" in the first empty cell from the Barcode column.

Copy the formula downwards to as many cells as needed. The asterisk (*) symbol indicates the beginning and the end of the sequence.

Note: If your data is stored in other columns, adjust the formula accordingly.

Step 6: Select the cells from your Barcode column (except for the header row) and change the font to Libre Barcode 39.

Change the font to Libre Barcode 39.

Navigate to the Home tab with the cells selected and choose Libre Barcode 39 from the Font menu. Also, increase the font size to match your needs. I have used a font size of 26.

Step 7: Enter alphanumeric data into the Code column to generate the barcodes.

Create barcode in Excel using a custom font and a simple formula.

How to generate random barcodes

You can use the RANDBETWEEN function to generate random numbers. The RANDBETWEEN function uses two arguments (bottom, top) to generate a random number. Using the bottom and top arguments, you can control the range of potential random numbers.

Using the same process described in the previous section, you can also create a barcode that is randomly generated.

Random Excel barcode generator.

I have created a random barcode generator using the following formula:

="*"&RANDBETWEEN(B3,C3)&"*"

where:

  • cell B3 is the bottom limit for the barcode generator
  • cell C3 is the top limit for the barcode generator

I have included the Excel spreadsheet I've used to create random barcodes. Download it and use it as you please. Just make sure to install the barcode font or change it to the one you have installed.

Create barcodes in Excel using add-in

If you don't want to create barcodes manually, you can use an Excel add-in. I have included a list with some of the most popular add-ins to create barcodes:

What to do next?

After reading this tutorial, I hope that you are better equipped to create barcodes in Excel. If you struggle to replicate the process shown in this article, drop me a comment below, and I'll help you out as soon as possible.

Thousands of people have benefited from my free Excel lessons. My only question is, will you be next?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Essential Functions

Excel Topics

Excel courses

I have compiled a list of the best Excel online courses. It covers basic and advanced topics, VBA, and Power BI.
View courses
Excel is a very complex application, and understanding it on your own may prove difficult and time-consuming. I have created ExcelExplained.com to help you better understand each function and provide useful examples for different tasks. If you can’t find the answer to your question in one of the published articles, please leave a comment or send me an email, and I will do my best to help you out.

Affiliate Disclosure: When you purchase a product through a link on our website, I may earn an affiliate commission. There are no additional costs to you.
Copyright © 2017-2022 ExcelExplained.com