Creating barcodes in Microsoft Office Excel for Mac

ConnectCode Barcode Software includes Open Type barcode fonts and Excel barcode formulas for creating high-quality barcodes in Microsoft Office Excel for Mac. The Excel formulas are used for validating input data in a cell and generating the necessary start/stop and check characters to ensure strict compliance with the auto-id (GS1/ISO) specifications. The output generated by the formulas can then be applied with the barcode fonts to display the barcodes.

Download


Note - Sample Excel spreadsheets with the barcode formulas to generate various types of barcodes are available in the Samples folder.

Tutorial on creating barcodes in Excel for Mac


  • Launch Microsoft Excel, and create a Blank Workbook.
  • We will first need to import the Excel barcode formulas into the spreadsheet. In Excel, click on the menu Tools -> Macro -> Visual Basic Editor. When the Visual Basic Editor is launched, make sure it is the active Window by clicking on its title bar. Next, click on File -> Import File, select the "Encoder.bas" file (available in officebarcodeaddin.zip), and click on the Open button.



    You should see a new module Modules -> Module1 added in the Project panel. To return to Excel, click on Excel -> Close and Return to Microsoft Excel.
  • Enter "123456" into cell A1 and the formula "=Encode_Code39(A1)" into cell B1 of the spreadsheet and press the return key. Cell B1 contains a barcode formula for generating a Code 39 barcode. You can also generate other types of barcodes such as Code 128 with the formula "=Encode_Code128Auto(A1)" or EAN13 with the formula “=Encode_EAN13(A1)”. The complete list of formulas and detailed instructions for creating different barcodes in Excel are available in this PDF documentation.

  • Take note of the value "*123456L*" generated in cell B1. Basically, the Encode_Code39 formula validates the input in cell A1, adds the start/stop characters "*", and generates the check character "L". This ensures your Code 39 barcode meets the requirements of the industry specifications.
  • Right-click on cell B1, select Format Cells, and click on the Font tab. Select "CCode39_S3" as the font and "24" as the font size. You can check out the PDF Documentation or use the Font Encoder app to easily identify the font names to use.


    Right-Click Context Menu -> Format Cells -> Fonts

  • You can copy/paste or drag the cells in Excel to bulk create barcodes easily and quickly.

  • When you save this Excel spreadsheet, remember to save it in .xlsm (Excel Macro-Enabled Workbook) format. This will ensure the barcode formulas are saved as part of the spreadsheet. The next time you open this spreadsheet, you will no longer need to import the formulas again.

Note:

Instead of importing the VBA formulas, as illustrated in this tutorial's first few steps, you can also launch the MacExcelBarcodeAddIn.xlam Add-In (available in officebarcodeaddin.zip) with Apple Finder before creating a new Workbook in Excel. This Add-In will automatically set up your workbook with the barcode formulas. Remember to click on Enable Macros when prompted by Excel.

Back to Barcode Software for Mac page.