QR Code in Excel: Three Methods

QR codes in Excel spreadsheets: for inventory lists, label printing, employee badges or invoice templates. Three methods, from quickly inserting an image to VBA automation for hundreds of rows.

Need to change the target after printing? Then you want a dynamic QR code, €4.99 one-time.

In short

  • One-off QR code: create the image in the generator above → insert it in Excel
  • Recurring (1 to 20 codes): install an add-in such as "QR4Office"
  • Bulk (50+ codes): VBA macro with the BARCODE function or an external API
  • Microsoft 365: a built-in BARCODE function has existed since 2024 (Insider versions only)
Customize colors & shape
QR branding

Pattern

Corners

Logo (optional)

Advanced: error correction
~7% correction · ideal for clean print, smallest modules
✨ Change the link later?This code is fixed: The target is stored in the code itself. With an editable one, you enter a new target later without touching the printed code.One-time payment, no subscription. The printed code stays the same.

Pricing and privacy at QR Kontor

Static QR codes are free, with no sign-up, no limit and no watermark. Dynamic QR codes, where you can change the destination after printing, cost €4.99 one-time per code. No subscription, no recurring fees. If you have seen other providers charge $49 to $197 for a "lifetime" code: a dynamic code is only a short redirect, no media storage, on EU hosting that costs little to run. That is why €4.99 covers it for good.

Your data is hosted in Frankfurt, Germany (Supabase EU and Vercel fra1). Only essential cookies for the login session, no marketing tracking and no third-party pixels.


Method 1: Insert the QR code as an image (for a few codes)

Step 1: Create the QR code

Open the generator above → enter a URL or vCard → download PNG (at least 600 × 600 px for good print quality).

Step 2: Insert it in Excel

  1. Select the cell where the QR code should go
  2. Menu "Insert" → "Pictures" → "This Device"
  3. Select the PNG. Excel places the image over the cell (not inside it)

Step 3: Anchor it to the cell

Important: by default the image floats "above" the sheet and does not move along when you move cells.

To anchor it to the cell:

Now the QR code moves along when you change columns or rows.


Method 2: Use an add-in (for 5 to 50 QR codes)

"QR4Office" or "QR Code Generator"

  1. Excel → menu "Insert" → "Get Add-ins"
  2. Search the store for "QR Code"
  3. Install the add-in, usually as a sidebar on the right

Workflow:

Limits: most add-ins cannot generate dynamically from cell data. Not practical for an inventory list with 200 QR codes.


Method 3: Bulk QR codes via formula (for 50+ codes)

This is where it gets powerful, for inventory labels, employee badges, invoice generators.

Option A: BARCODE function (Microsoft 365)

Microsoft introduced a built-in BARCODE function in 2024 (Insider versions and Microsoft 365 Enterprise only).

=BARCODE(A2, "QR_CODE")

Places the QR code as cell content. The content of cell A2 is encoded.

Option B: VBA macro with the BarCode control (Excel desktop)

For older Excel versions or plain desktop Excel:

  1. Enable the Developer tab (File → Options → Customize Ribbon)
  2. Insert the ActiveX control "Microsoft BarCode Control"
  3. Via VBA: Sheet1.Shapes("Barcode1").OLEFormat.Object.Value = Range("A2").Value
  4. Iterate over all rows

Code template:

Sub GenerateQrCodes()
    Dim r As Range
    For Each r In Range("A2:A200")
        ' Generate QR based on r.Value
        ' Insert image in column B next to it
    Next r
End Sub

Effort: about 1 hour to get started, after that it scales to any size.

Option C: External API via Power Query

If you want a Google Sheets-style solution, you can use Power Query to fetch a QR image URL per row from an external API (for example Google Charts or QR Server). You can then open the image via hyperlink or insert it as an image via VBA.


Practical use cases

Inventory list with QR labels

Table with columns: ID | Item | Location | QR

Employee badges

Table with: Name | Email | Phone | vCard string | QR

Invoice generator with a payment QR code

Table: Invoice no. | Customer | Amount | Payment string | QR


FAQ

What resolution do I need for print? Rule of thumb: print size in cm × 120 DPI. For a 3 cm (1.2 in) QR code in print: at least 360 × 360 px image resolution.

Can I generate the QR code directly from a cell formula? With the new BARCODE function in Microsoft 365 Insider: yes. Standard Excel: no, it needs VBA or an add-in.

Does this also work in LibreOffice Calc / OpenOffice? LibreOffice: yes, via extensions such as "LibreOffice QR Code Generator". OpenOffice: only via an external tool and image insertion.

How do I anchor the image to a cell so that it filters along? Right-click the image → "Size and Properties" → "Move and size with cells". Then the image behaves like cell content.

Can I do QR codes in several languages with an Excel template? Yes, if your URLs or vCards contain the respective language variants. QR codes themselves are language-neutral, the content is not.

How do I combine QR codes with label printing? Workflow: Excel list → Word mail merge → label template with QR image placeholder → printer with label roll.

Does this work in Excel Online? Only via add-ins. Inserting images works. There is no VBA in Excel Online.


When a dynamic QR code makes sense

If your Excel QR codes end up on labels or printed lists that are used for years, and the destination could theoretically change (server URL moves, item gets renamed), a dynamic code pays off: the printed code stays the same, you swap the destination in the dashboard. Saves you reprinting 500 labels.


Need a dynamic QR code?

Change the target any time, even after printing. €4.99 one-time, no subscription.

Start for free

More QR code guides

All guides →