How to Create QR Codes in Excel: Formulas, VBA, and Bulk Creation


Learn how to generate QR Codes in Excel using the IMAGE function, VBA, add-ins, and bulk upload methods. Includes formulas, use cases, and troubleshooting tips.
Excel doesn’t have a built-in QR Code generator, but three methods help you create a QR Code in Excel: the IMAGE function (Microsoft 365), a VBA custom function (Excel 2016 to 2019), and the QR4Office add-in. Each converts cell data into scannable QR Codes directly inside your spreadsheet. For bulk generation of 50 or 500 rows, the IMAGE formula scales down a column in seconds.
This guide covers three methods to generate QR Codes in Excel using formulas, VBA add-ins, and how to create QR Codes in bulk.
What is an Excel QR Code?
An Excel QR Code is a QR Code generated from data stored in a Microsoft Excel spreadsheet. The data source is a single cell, a cell range, or a value returned by a formula. Excel produces the QR Code through one of three methods: native formula functions, VBA macros, or third-party add-ins. The encoded value is a URL, a plain text string, or a unique identifier such as a SKU or employee ID. A scan decodes the value and routes the user to the destination.
Microsoft Excel does not include a built-in QR Code generator. The user connects the cell data to an external QR Code API or installs a QR Code add-in to render the image inside the worksheet.
Excel QR Codes convert spreadsheet rows into scannable assets at a batch scale. A single worksheet generates QR Codes for product pages, inventory IDs, event check-in links, or employee records in one pass. The batch method removes manual data entry, eliminates transcription errors, and compresses production time on datasets that contain hundreds or thousands of rows.
How to create QR Codes in Excel
Create QR Codes in Excel quickly by using the =IMAGE() function paired with a free API, or by using built-in templates.
Start with this quick check to find your method:
| My situation | Use this method |
|---|---|
| I have Microsoft 365 | IMAGE function (Method 1) |
| I have Excel 2016–2019 | VBA function (Method 2) |
| I want a UI with no formulas | QR4Office add-in (Method 3) |
Method 1: How to create a QR Code in Excel using the IMAGE function (Microsoft 365)
To create a QR Code in Excel using the =IMAGE() function, you can use a formula. The IMAGE function in Microsoft 365 and Excel Online displays an image in a cell by pointing to a URL. Combined with the QR Server API, it generates a QR Code directly from any cell value without needing a separate app or add-in.
Prerequisite: Microsoft 365 subscription. The IMAGE function is not available in Excel 2019 or earlier versions.
Steps:
1. Put the data you want encoded in column A: URLs, product IDs, text strings, one value per row.

2. Click cell B2, the cell next to your first data row. Paste the formula above. Press Enter. A QR Code appears in the cell.

3. Select B2. Drag the fill handle down to apply the formula to all data rows.

4. Resize the column width and row height so each code is at a minimum of 150x150 pixels before printing.
Note: This formula requires an internet connection to display the codes. They will not render offline.
What you get: A column of QR Code images, each encoding the corresponding cell value in column A. The images live in the cells and resize with the column. You can screenshot-export or print directly from Excel. You cannot export individual files per row from this method.
Method 2: How to create a QR Code in Excel using VBA (Excel 2016–2019)
To create a QR Code in Excel using Visual Basic Applications (VBA), you can use a macro that sends a request to a free API, generate a QR Code, and insert the code image in the Excel. If you have Excel 2016, 2019, or another version without the IMAGE function, a VBA custom function produces the same result. No add-ins needed. The function runs entirely within Excel's built-in Visual Basic Editor, which ships with every version of Excel.
Steps:
- Open your Excel file.
- Press Alt + F11 to open the Visual Basic Editor.
- Go to Insert > Module to add a new code module.
- Paste the following function into the module window (see code block below).
- Close the editor by pressing Alt + F4 or clicking the X on the editor window.
- Return to your spreadsheet. In cell B2, next to your first data row, enter: =IMAGE(GETQRCODE(A2))
- Drag the formula down to apply it to all rows.
Function GETQRCODE(data As String) As String GETQRCODE = "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" & Application.EncodeURL(data)End Function
Save the workbook as .xlsm (macro-enabled workbook format) to preserve the VBA function across sessions. If you save as .xlsx, Excel will prompt you to remove the macro and GETQRCODE will stop working.
VBA-generated QR Codes are static. The URL is encoded at generation time. Changing cell A2 after the fact generates a different code. It does not update any code that has already been printed.
Method 3: How to create QR Codes in Excel using an add-in (QR4Office)
To create QR Codes using the QR4Office add-in, install it, configure your data type and content, and insert the QR Code directly into your spreadsheet.
Steps:
- Go to Home > Add-ins in the Excel ribbon.
- Search for QR4Office and click Add.
- Select the cell where you want the QR Code to appear.
- In the QR4Office side panel, enter the data to encode or click a cell reference.
- Set the size and any style options the panel offers.
- Click Insert. The code appears in the selected cell.
For bulk generation, repeat this process per row. QR4Office is suited to low-volume, one-at-a-time generation. For batches of 50 or more, Methods 1 or 2 are faster.
Export format is PNG only. If you need SVG for large-format print production, this method will not meet that requirement.
A note on QR Code size before printing: The minimum recommended QR Code print size is 2cm x 2cm (approximately 0.8 inches square). Codes printed smaller than this may fail to scan reliably, particularly if the encoded data is long.
How to bulk-generate QR Codes from Excel using Uniqode
You can bulk-generate QR Codes from Excel with Uniqode. Map the required fields using the template, upload your spreadsheet, apply a consistent design, and create all codes in one batch. Once generated, you can manage, track, update, and download them directly from the dashboard without recreating individual QR Codes. Below are the complete steps to generate multiple QR Codes from Excel on Uniqode.
Step 1: Select QR Code type to bulk upload
On the Uniqode dashboard, select the QR Code tab on the left and click Bulk Create. Select the QR Code type that you want to bulk create.

Step 2: Upload QR Code data
We recommend using the template provided in the dashboard to fill in the details of your QR Codes. Each QR Code type you select will have different headers and inputs, so you must fill in the sheet accordingly. For example, a website QR Code requires entering your QR Code name, Website URL, Frame text, and Short URL alias (optional).
Once you've filled in your sheet in Excel, save the changes and upload your Excel file in CSV or XLSX format.

Step 3: Customize your QR Code design
Customize your QR Code's design. You can change the logo, QR Code shape, color, pattern and CTA frame.
Note that your design will be applied to the entire batch of QR Codes.

Step 4: Assign a label to your batch
You will now be asked to assign a label to your batch. This will help you better manage your new batch of QR Codes in the future. Once you've assigned the label, select Apply. Once uploaded, you will receive an email on your QR Code creation status.
Step 5: View and bulk download your QR Codes
You can now view your QR Codes on the dashboard. You can also apply the filters and choose the label you have assigned to find your bulk-created QR Codes easily. You can also download your QR Codes in bulk.
Each QR Code has a live scan log in the dashboard: total scans, unique scans, device type, and scan location. If a destination URL needs to change at any point, update it in the dashboard. The physical code stays the same.
Pro tip: Save time and eliminate manual work by automating QR Code creation with the Zapier integration. Trigger a new code whenever a row is added in Microsoft Excel or Google Sheets and generate it in Uniqode. Send the QR Code instantly to Slack, email, or Drive.
QR Codes for Excel: Use cases
QR Codes created within Excel sheets are used in inventory and asset management, product authentication, digital business cards, survey collection, and attendance tracking. Here are the most common ways teams put Excel QR Codes to work.
1. Inventory and asset management
Operations teams maintain asset or equipment registers in Excel: one row per asset, with an asset ID and a URL pointing to a specification sheet, maintenance record, or location page. Generate one QR Code per row, print labels, and attach them to the physical assets.
Scanning the label pulls up the current record. Teams managing equipment across multiple sites build their asset register in Excel first, then generate QR Codes in bulk from that file: one per row, each pointing to that asset's live record.
2. Product authentication and packaging
Manufacturers and brands use QR Codes on physical packaging to link to authentication pages, certificates of origin, or compliance documentation. The Excel file is the product catalog: one row per SKU, with the authentication URL.
Dynamic codes allow the authentication page URL to change without reprinting the labels. The printed code keeps working. Maesa, a beauty company managing thousands of product SKUs, used dynamic QR Codes on packaging for product authentication, a workflow that contributed to preventing $10 million in product loss.
3. Digital business cards
HR and sales teams store employee contact data in Excel: names, titles, and a URL per employee pointing to their digital business card page. One QR Code per employee goes on a printed card or email signature. The URL in the Excel file is the only input needed.
4. Surveys and feedback collection
Marketing and CX teams link QR Codes to survey or feedback forms. The Excel file contains location names, event names, or campaign identifiers in one column and the form URL in another. Printed at event venues, on product packaging, or on receipts, each code routes respondents to the right form for that location or campaign.
5. Attendance tracking
Event coordinators and HR teams build attendance rosters in Excel: one row per attendee, with a check-in URL or registration page for each attendee.
QR Codes generated from the roster are printed on badges or tickets. Scanning at the venue confirms attendance and logs the scan time. Each badge carries a unique code. Each scan is one confirmed attendee.
Static vs. dynamic QR Codes in Excel workflows
All three Excel methods (the IMAGE function, VBA, and QR4Office) produce static QR Codes. The destination URL is encoded permanently into the pattern at the time of generation. If the URL changes after the code has been printed, the code breaks. You need to regenerate it and reprint the label.
For use cases where the destination is fixed and permanent, such as an inventory asset page that will not move or a survey form with a stable URL, static codes work fine.
The problem comes up in workflows where the QR Code's destination needs to change after print. Product packaging is the clearest example. If a URL on a label needs to redirect to an updated authentication page, a static code cannot accommodate that without a reprint.
Dynamic QR Codes solve this by routing through a redirect. The printed pattern stays the same. The destination URL is updated in a dashboard. No reprint needed.
Excel cannot generate dynamic QR Codes natively. For that, you need a dedicated platform. Uniqode lets you bulk-generate dynamic QR Codes from an Excel file, and update any destination URL from the dashboard after the codes are already in the field. Start your free trial today on Uniqode and create your first QR Code.
Frequently asked questions
1. Does Excel have a built-in QR Code generator?
Excel does not have a native QR Code feature. The IMAGE function in Microsoft 365 can render QR Codes by connecting to a third-party API such as api.qrserver.com, but this is a formula workaround rather than a built-in capability. Older versions of Excel require a VBA function or a third-party add-in to achieve the same result.
2. How do I create a QR Code from Excel data?
Use this formula in the cell next to your data column in Microsoft 365:
=IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="&ENCODEURL(A2))
Replace A2 with the cell containing your data. Press Enter and the QR Code appears in the cell. Drag the formula down to generate one code per data row.
3. Can I create QR Codes in bulk from an Excel file?
Yes. In Microsoft 365, the IMAGE formula applied down a column creates one code per row within the spreadsheet. For a folder of individual downloadable image files (PNG or SVG, one per row), import your Excel file or CSV into a bulk QR Code generator like Uniqode. Uniqode produces one file per row and packages them in a single ZIP download.
4. What is the difference between a static and dynamic QR Code?
QR Codes generated in Excel are always static. The destination URL is locked into the pattern at generation. If the URL changes after printing, the code breaks and needs to be reprinted. Dynamic QR Codes route through a redirect, so the destination can be updated in a dashboard without reprinting. Excel cannot generate dynamic codes natively. A platform like Uniqode is required for that.
5. Can I track scans for QR Codes made in Excel?
No. Excel-native methods (the IMAGE function, VBA, and add-ins) generate static QR Codes with no tracking capability. Scan analytics (time, device type, location) require a QR Code platform. Platforms like Uniqode log each scan with full data accessible from a dashboard.
6. How do I create a QR Code for an Excel file itself?
Upload the Excel file to a shared location (SharePoint, Google Drive, or OneDrive) and copy the shareable link. Use that link as the data for any of the methods above. The QR Code points to the live file. Anyone scanning it opens the spreadsheet directly.
7. Can I create dynamic QR Codes from Excel spreadsheets?
No. All three Excel methods produce static QR Codes. To create dynamic codes from Excel data, use a platform like Uniqode. Upload your Excel file, and Uniqode generates one dynamic code per row. Each code can be updated, tracked, and managed from the dashboard without reprinting.
8. Which QR Code generator supports bulk creation?
Uniqode supports bulk creation directly from an Excel or CSV file. Upload your spreadsheet, apply a design, and Uniqode generates one QR Code per row and packages them in a single ZIP download. Each code is dynamic, trackable, and editable from the dashboard after generation.
Frequently Asked Questions
- Can you generate QR codes directly in Excel without third-party tools?
No, Excel does not have a built-in QR code generation feature. You must use external tools like online QR code APIs with Excel's IMAGE function or install third-party add-ins from the Excel add-in marketplace. Both methods require connecting to external QR code generation services to create the codes within your spreadsheet.
- What is the best method for creating QR codes in bulk from Excel data?
Using a dedicated online QR code generator is the most effective method for bulk QR code creation from Excel data, offering superior functionality compared to Excel formulas or add-ins. Excel-based methods have 3 major limitations: they're difficult to use for downloading and resizing, they lack tracking capabilities to monitor scan data like locations and devices, and they often rely on free generators with low security standards.
- How do I create a QR code in Excel using a formula?
You can create QR codes in Excel by using the IMAGE function combined with an online QR code generation API. Place the formula =IMAGE(api_url&cell_reference) in the cell next to your data (for example, in cell B2 if your data is in A2), then fill in the required parameters including row number, alternate text, and image size to generate the QR code automatically.
- Can QR codes created in Excel be tracked for scan analytics?
No, QR codes generated through Excel formulas or add-ins cannot be tracked for performance metrics. You won't be able to access critical data such as the number of scans, geographic locations of scans, or devices used to scan the codes. Only dedicated QR code generators with dynamic QR code capabilities offer tracking and analytics features.
- What are Excel QR code add-ins and how do they work?
Excel QR code add-ins are third-party applications that you install from the Excel add-in marketplace by selecting Home > Add-ins and searching for QR code apps. These add-ins offer more functionality than the IMAGE formula method, including customization options and easier resizing capabilities. After installation, you select your data cell range and click "Generate QR Code" to create codes for multiple rows simultaneously.
- Are QR codes generated in Excel secure for business use?
QR codes created through Excel formulas and add-ins are not considered secure because they rely on free QR code generation services that offer low security standards. This dependency exposes users to multiple QR code-related security vulnerabilities and doesn't guarantee data protection. Businesses requiring secure QR codes should use dedicated, professional QR code generators with enhanced security features.


