Skip to content
Bulk & Automation

How to Generate QR Code in Excel

Worker filling down a spreadsheet column to generate QR codes in Excel

To answer how to generate qr code in excel quickly: 1) Put the text or URL you want to encode in a cell, 2) Use the IMAGE function to display a QR image from a QR API URL, and 3) Fill the formula down for bulk rows. If IMAGE is unavailable, use VBA, an add-in, or insert downloaded images.

Learn 4 ways to generate QR codes in Excel: IMAGE formula with a QR API (bulk-friendly), VBA macros for older versions, add-ins, and manual image insert. You can generate QR codes in Excel using the IMAGE function (Microsoft 365/Excel Online), VBA for older versions, add-ins, or by inserting downloaded QR images. This guide shows the steps and bulk workflow.

TLDR: Use IMAGE in Microsoft 365 or Excel Online to build QR codes from a column fast, but it depends on an external QR image API being reachable. If you cannot use IMAGE, choose a VBA macro for automation in older desktop Excel, or use an add-in or manual image inserts for occasional needs.

Quick pick: which Excel QR method should you use?

The best method depends on two things: your Excel version and whether you need many QR codes that stay in sync when cell values change.

Decision guide (version + workflow):

  • Microsoft 365 or Excel Online: Use IMAGE + a QR image API. This is the fastest way to generate many QR codes from a column and keep them updating as the source cells change.
  • Older desktop Excel (no IMAGE): Use VBA (Visual Basic for Applications) to automate QR image creation or insertion. This depends on macro permissions and saving a macro-enabled workbook (.xlsm).
  • No formulas or no macros allowed: Use Office add-ins such as QR4Office. This is often simpler to run, but results are commonly static images that do not auto-update.
  • One-off or very small batch: Generate on an external site, download the image, then Insert → Pictures in Microsoft Excel.

Quick checks before you commit:

  • Check your Excel version. Microsoft 365 or Excel Online is typically required for the IMAGE method.
  • Test-scan one generated code before you fill down a whole column.
  • If you hit #CONNECT! or blank images, switch to an alternate API endpoint from this guide.
  • If your data includes spaces or symbols, plan for URL encoding before you generate the QR image URL.

Method comparison (at a glance)

MethodRequirementsBulk friendlinessUpdate behaviorConstraints
IMAGE + QR APIThis varies by tool. Commonly Microsoft 365 or Excel Online with the IMAGE functionStrong (fill down a column)Updates when the source cell changes (formula-driven)Depends on external API reachability and correct URL encoding
VBA macroDesktop Excel with VBA enabled, Developer tab access, .xlsmMedium to strong (automation possible)This varies by setup. Often needs a rerun or recalculation planMacro security prompts and org policy may block it
Add-in (QR4Office)Office add-ins accessMedium (depends on add-in features)Often static images that do not auto-updateMay have licensing limits and generation limits, depending on the add-in
Download + insertAny Excel versionWeak for bulkStatic imagesManual steps per code, hard to keep in sync

The practical takeaway: If your sheet is row-based and changes often, IMAGE formulas are usually the easiest to keep aligned with cell values.

QR codes in 30 seconds: what they are and why standards matter

Phone held above a printed generic QR code on a desk

A QR code (Quick Response code) is a two-dimensional barcode made of black and white square modules arranged in a grid. It was invented by DENSO WAVE in 1994, and ISO maintains an ISO/IEC standard for QR codes.

Two visible features matter for scan reliability in real use:

  • Finder patterns: The large squares in corners that help a camera detect and orient the code quickly.
  • Timing patterns: The alternating modules that help the scanner measure the grid and align decoding.

In Excel workflows, scan reliability is mostly influenced by clear sizing, good contrast, and not cropping the quiet area around the code (often called the quiet zone).

Method 1 (Microsoft 365): Generate QR codes with IMAGE + a QR API

This is the simplest way to generate QR code in Excel when you need formulas to drive the output from cells.

Does the IMAGE function work for QR codes in Excel? Yes, as long as Excel can fetch an image from a URL, the IMAGE function can display that QR image inside a cell. This varies by tool. Availability is commonly associated with Microsoft 365 and Excel Online, and behavior can differ by Excel build and tenant settings.

How do I generate a QR code in Excel? Put your text or URL in a cell, then use IMAGE to display a QR image URL that includes that cell as the data parameter. If you need many codes, copy the formula down so each row builds its own QR from its own source cell.

A helpful mental model is:

[Cell value] → (Build a QR image URL) → IMAGE(url) → (QR image appears in the cell)

Step-by-step (QR Server API example)

This varies by tool. The workflow below assumes IMAGE is available in your Microsoft Excel.

  1. Put the value you want to encode in a cell, like A2 (a URL, an ID, or any text you want in the QR code).

  2. Click the cell where you want the QR code to appear, like B2.

  3. Enter an IMAGE formula that points to a QR image endpoint and concatenates A2 into the URL:

    =IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=200x200&data="&A2)

  4. Press Enter and wait for the image to load inside the cell.

Small diagram to capture (for your own reference or documentation):

  • Capture the formula bar showing =IMAGE("…data="&A2).
  • Capture the resulting QR image rendered in the cell.
  • Capture the source cell A2 so it is obvious what value is being encoded.

Note: When you use this pattern, you are not generating a QR internally. You are asking Excel to fetch an image from an external URL and render it through the IMAGE function.

Bulk workflow: generate a QR code for every row

If your goal is bulk output, the fastest pattern is a two-column layout: one for data, one for the QR formula. This is the heart of bulk generate QR codes in Excel column workflows.

Can Excel create QR codes in bulk from a column? Yes, if you use a formula-based method like IMAGE, you can fill the formula down so each row generates its own QR from its own data cell. The bulk behavior comes from Excel’s fill handle copying the formula pattern, not from a special QR feature.

For bulk, the setup matters more than the formula.

A repeatable layout that scales

Suggested sheet layout:

  • Column A: DataToEncode (text, URLs, SKUs, ticket IDs)
  • Column B: QRCode (the IMAGE(...) formula output)

Steps (fill-down workflow)

  1. Put your list of values in column A, starting at A2 (keep A1 as a header).
  2. In B2, enter your QR IMAGE formula that references A2.
  3. Select B2, then drag the fill handle down to copy the formula to B3, B4, and so on.
  4. Test-scan a few QR codes from different rows, especially rows that contain spaces or symbols.
  5. If you edit a value in column A, confirm the QR in column B updates, since formulas are meant to reflect source cell changes.

What to capture in an annotated screenshot-style callout:

  • A highlight box around Column A showing your source values.
  • A highlight box around Column B showing the IMAGE formula results.
  • An arrow pointing at the fill handle on B2, showing the drag direction down the column.
  • A note that the formula references shift per row (A2A3A4).

This formula-driven behavior is what makes it practical to generate QR code for Excel spreadsheet rows that may be edited later.

Alternative IMAGE formulas (if one API fails)

Person editing a spreadsheet with generic QR images loading in cells

The main risk of the IMAGE approach is dependency on an external QR image service. If one endpoint is blocked or temporarily unavailable, you can often keep your spreadsheet working by swapping the URL.

If you are standardizing a pattern for a team, it helps to keep one known-good formula per endpoint, so you can switch quickly.

QuickChart (alternative endpoint)

This varies by tool. Example IMAGE formula:

=IMAGE("https://quickchart.io/qr?text="&C2)

Use it the same way as the first method: put the data in C2 (or any cell), then reference that cell in the URL.

tec-it QR code API (alternative endpoint with parameters)

This varies by tool. The tec-it QR code API is often used when you want to pass extra settings through URL parameters (for example, error correction and quiet zone behavior).

A spreadsheet-friendly pattern is to keep settings in cells so you are not hardcoding specifics into the formula:

=IMAGE("https://api.tec-it.com/barcode.ashx?data="&A2&"&code=QRCode&eclevel="&D2&"&quietzone="&E2)

  • Put your data in A2.
  • Put an error correction level like M in D2 (levels are typically L, M, Q, H).
  • Put your quiet zone setting in E2 based on what your endpoint accepts.

Excel QR code formula using qrserver API note: If you already deployed the QR Server API formula and it breaks due to connectivity, keep the same sheet layout and only replace the URL portion with QuickChart or tec-it. That way, your bulk fill-down logic stays unchanged.

Troubleshooting: #CONNECT!, special characters, and reliability issues

Laptop spreadsheet showing broken QR image cells while a person troubleshoots

When an IMAGE QR stops working, the root cause is usually not the QR itself. It is the image fetch.

Why does Excel show #CONNECT! when generating QR codes? #CONNECT! usually means Excel could not retrieve the image from the external service. It can happen if the API is down, blocked, slow to respond, or if the request URL is malformed. Some users have reported #CONNECT! with the Google Chart API, which is why having alternate endpoints matters.

Common failure modes to expect:

  • API reachability and downtime risk: Your spreadsheet depends on a third-party endpoint being reachable.
  • Lag while fetching images: This varies by tool. Excel may take time to download images, especially when many rows recalculate.
  • Special characters: Characters like spaces, &, ?, %, and non-ASCII characters can break the request if the data is not URL-safe.
  • URL encoding requirement: If you build a URL with raw text, you can accidentally create an invalid URL.

If your issue is specifically fix #CONNECT error generating QR in Excel, start by checking whether the endpoint is reachable from your network (corporate firewalls are common blockers), then swap to an alternative endpoint and re-test.

Symptom-to-fix table

SymptomLikely causePractical fix
#CONNECT!External API not reachable, blocked, or temporarily downRetry later, switch to QuickChart or tec-it, or use a non-API method (VBA/add-in/manual)
Blank image or broken image iconMalformed URL, often from unencoded special charactersApply URL encoding to the data before concatenation, or store pre-encoded values in a helper column
Very slow load or frequent refreshMany rows fetching images at once, or recalculation churnGenerate in smaller batches, avoid volatile recalculation, and confirm images load before filling thousands of rows

The practical takeaway: API-based IMAGE QR codes are fast to set up, but reliability depends on external image fetching.

Method 2 (older Excel): Generate QR codes with a VBA macro

If you are on an older desktop version of Microsoft Excel without IMAGE, VBA (Visual Basic for Applications) is the usual automation path. People often use VBA to build a URL to a QR image and then insert the image into the sheet, or to create a custom worksheet function that triggers that process.

How do I create a QR code for an Excel sheet using VBA? Enable the Developer tab, open the VBA editor, insert a Module, add a macro or custom function, then call it from your sheet (for example =GETQRCODES(A2)). Save the file as a macro-enabled workbook (.xlsm) so the code is retained and can run.

This section is intentionally high-level because macro implementations vary, especially around image downloading and placement.

Setup steps (high level)

  1. Enable the Developer tab in Excel options if it is not visible.
  2. Open the VBA editor, then insert a new Module in your workbook project.
  3. Add the VBA code your organization approves for generating or inserting QR images.
  4. Back in the sheet, use a custom function call pattern such as =GETQRCODES(A2) (name depends on the code you use).
  5. Save the file as a macro-enabled workbook (.xlsm) and confirm your macro security settings allow the code to run.

Example call (as seen in a worksheet):

  • =GETQRCODES(A2)

Notes to keep in mind:

  • Macro behavior depends on how the code was written. Some macros insert images as shapes, which are usually static after insertion.
  • Macro security is often controlled by IT policy, so this method may be blocked in some environments.

Method 3: Use an Excel add-in (QR4Office) for a no-formula option

If you cannot use formulas or macros, an add-in can be the easiest way to create QR images directly from within Excel. This is where Office add-ins like QR4Office fit.

How the add-in workflow usually works

  1. Open Excel, then go to the Office add-ins store experience (the exact menu label varies by Excel version).
  2. Find and install QR4Office.
  3. Use the add-in panel to generate a QR code from selected text or a typed value.
  4. Place the generated QR image onto the sheet.

This varies by tool, but add-ins commonly offer controls such as:

  • Size selection.
  • Color selection.
  • Error correction level selection.

Tradeoffs to understand before you depend on it:

  • Static image behavior: Add-in generated QR images are often inserted as images or shapes. If a referenced cell value changes later, the QR image typically will not auto-update.
  • Bulk limitations: Some add-ins may restrict how many QR codes you can generate without a paid plan and may not be designed for fill-down, row-driven output.
  • Consistency: If multiple people edit the same file, you may get inconsistent results depending on add-in availability and permissions.

If you specifically need Excel QR code add-in QR4Office setup for a team, confirm that everyone who must edit the workbook can access the same add-in environment.

Method 4: Use an external QR generator and insert the image into Excel

This is the most universal fallback because it works with any Excel version and does not depend on IMAGE, VBA, or add-ins. It is also the easiest to understand, but it does not scale well.

Steps (manual insert workflow)

  1. Generate a QR code on an external QR generator website using your text or URL.
  2. Download the QR image file to your computer.
  3. In Excel, use Insert → Pictures and select the downloaded file.
  4. Resize and align the picture in the target cell area.

This method is exactly what people mean by insert downloaded QR code image in Excel.

When to use it:

  • You only need a few QR codes.
  • Your environment blocks external image fetching in formulas and blocks macros.
  • You need a fixed QR image that should not change based on later spreadsheet edits.

Why it does not scale for bulk generation:

  • Every QR code requires manual generation and manual placement.
  • If the underlying data changes, you must repeat the whole generate-download-insert process.

Static vs dynamic QR approach (what it means in Excel)

In spreadsheet terms, static vs dynamic is mostly about whether your QR output stays in sync with changing cell values.

  • Formula-driven IMAGE approach: Often behaves like a dynamic QR code inside the sheet because the QR image is tied to a formula referencing a cell. If A2 changes, the URL changes, and Excel fetches a new image.
  • Inserted images (add-in or manual): Usually a static QR code in the workbook. The image does not change when a cell changes, because it is just a picture object.
  • VBA approach: This varies by setup. If the macro inserts an image, the result is typically static until you rerun the macro. If you implement a recalculation-driven workflow, you can approximate dynamic behavior, but it still depends on macro execution rules.

Operationally, this is the core maintenance question:

  • If you expect data edits, prefer formula-based generation where possible.
  • If the data is finalized and will not change, static images are simpler to manage and share.

If you are documenting how to generate qr code in excel for your team, include one explicit rule in your workbook: whether QR codes should update when the source cell changes, or whether they are meant to be fixed artifacts for a finalized list.

Get started

Free for the first code.
$279 lifetime if you ever upgrade.

No credit card. No trial clock.