Step by Step Guide on How to Make a QR Code in Excel – (VBA Steps Bonus)

How to Make a QR Code in Excel (Yes, It’s Totally Possible!)

Excel is more than just for numbers and data. It can also make QR codes. QR codes help with labels, sharing links, and tracking inventory. They make your work more efficient.

In this post, I'll show you how to create a QR code in Excel. No coding needed. Just a few clicks and you're done.

🔧 What You’ll Need

To create a QR code in Excel, you have a couple of easy options. The simplest way is to use Excel's WEBSERVICE function and Google’s free Chart API.

You'll need:

  • Microsoft Excel (works in most versions, especially 2016 and up)
  • An internet connection
  • A bit of copy-paste magic ✨

🪄 Step-by-Step: Create a QR Code in Excel

1. Open Your Excel Workbook

Begin with a blank sheet or the one you want to add QR codes to.

2. Enter the Data You Want to Encode

For example, if you want to turn a URL into a QR code. Type or paste the link into a cell, like this:

Cell A2: https://yourwebsite.com

3. Use This Formula to Create a QR Code Image

In the next cell, use this formula:

=IMAGE("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & ENCODEURL(A2))

4. Press Enter

And voilà! 🎉 A QR code should now appear in the cell. You can scan it with your phone to test it out.

🧠 What the Formula Does

Here’s what it does:

  • https://chart.googleapis.com/chart – This is Google’s Chart API.
  • chs=150×150 – Size of the QR code (you can adjust it).
  • cht=qr – Chart type = QR code.
  • chl= – This is where your data goes.
  • ENCODEURL(A2) – Ensures your link/text is safely encoded for the web.

🎯 Tips & Tricks

  • Make it dynamic: Drag the formula down to generate QR codes for a whole list of links or items.
  • Adjust size: Want a bigger QR code? Change 150×150 to 300×300 (or whatever size you need).
  • Text, numbers, anything: QR codes aren’t just for links. You can input contact info, product codes, plain text, and more.

🛑 A Note on Internet Access

Since the formula pulls data from an online API, it won’t work offline. Make sure you're connected to the internet when generating QR codes.

✅ Bonus: Make It Pretty

  • Resize cells to fit the QR code neatly.
  • Add labels beside your QR codes.
  • Format borders and colors for a clean, professional look.

📌 Wrapping Up

Making QR codes in Excel is easy and really useful. It's great for marketing, inventory, events, or just to be cool with spreadsheets.

Try it out and show off your Excel skills to your coworkers!

Do you have any Excel tricks? Share them in the comments below 👇

QR Code in Excel Using VBA

Making QR codes in Excel is easier than you think. With a bit of VBA, it's simple. QR codes are great for organizing data, labeling items, or sharing links.

In this guide, you'll learn to generate QR codes automatically in Excel using VBA and Google’s Chart API.

✅ What You’ll Need

  • Microsoft Excel (any modern version)
  • A little bit of copy-paste with VBA
  • Internet connection (we're using Google’s free QR code generator)

🛠️ Step-by-Step Guide

Step 1: Open the VBA Editor

  1. Open Excel.
  2. Press ALT + F11 to open the Visual Basic for Applications (VBA) editor.
  3. In the menu, click Insert > Module to create a new module.

Step 2: Paste the VBA Code

Copy and paste this code into the module window:

Sub GenerateQRCode()
    Dim cell As Range
    Dim QRText As String
    Dim QRImageURL As String
    Dim QRRange As Range
    Dim QRShape As Shape

    ' Define the range where your text data is (change as needed)
    Set QRRange = Range("A2:A10") ' Example: data is in column A, rows 2 to 10

    For Each cell In QRRange
        If cell.Value <> "" Then
            ' Create the Google QR Code API URL
            QRText = WorksheetFunction.EncodeURL(cell.Value)
            QRImageURL = "https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & QRText

            ' Insert the image into the adjacent cell (column B)
            Set QRShape = ActiveSheet.Pictures.Insert(QRImageURL)
            With QRShape
                .Top = cell.Top
                .Left = cell.Offset(0, 1).Left
                .Width = 75
                .Height = 75
            End With
        End If
    Next cell
End Sub 

Step 3: Prepare Your Data in Excel

  • In column A, list the text or links you want to convert to QR codes (e.g., A2 to A10).
  • Leave column B empty — that’s where your QR codes will appear!

Step 4: Run the Macro

  1. Go back to Excel.
  2. Press ALT + F8 to open the macro dialog.
  3. Select GenerateQRCode and click Run.

🎉 You’ll now see QR codes next to each item in your list!

🧠 Tips

  • You can adjust the size of the QR codes by changing chs=150×150 in the URL.
  • Modify the QRRange if your data is in a different column or sheet.
  • Works great for URLs, emails, contact info, product IDs, and more.

Leave a Comment

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