Excel cannot generate a QR code with a built-in function, but you can add working QR codes to a spreadsheet in three practical ways: use the free Barcode object from the Microsoft Barcode Control (Windows desktop Excel only), use a Microsoft 365 add-in that renders barcodes inside cells, or generate the images outside Excel and import them as pictures. Which route you take depends on whether you need a single code, a whole column of codes that update automatically, or codes inside a file that others will open on a Mac or in the browser.

Labels and menu names can differ slightly by Excel version, device and region, so if a button is not where this guide says, look for the nearest equivalent name.

\n

What You'll Need

\n
  • Excel for Microsoft 365 on Windows for the add-in and ActiveX methods. Excel on the web and Excel for Mac cannot insert ActiveX controls, so use the image-import method there.
  • The data you want to encode — a URL, an email address, a serial number, a Wi-Fi login, or plain text. Keep each value in its own cell.
  • For the external-image route: a QR generator website or app, and an image viewer. No account is required for most free generators.
  • For the add-in route: an internet connection and permission to install add-ins, which some workplaces block.
\n

Step-by-Step

\n

Method 1: Import QR images into cells (works everywhere)

\n
  1. Type the values you want to encode in a column, one per row, with a clear header such as QR Text. Do not add spaces or line breaks unless they are part of the intended content.
  2. Open a QR code generator in your browser and paste the first value. Choose the size and error-correction level you want. Higher error correction makes the code denser but more tolerant of smudges or partial covering.
  3. Download the image as PNG. Avoid JPG, because compression artefacts blur the modules and scanners struggle with them.
  4. In Excel, click the cell where the code should sit, then go to Insert > Pictures > This Device and pick the downloaded file. On the web version the path is Insert > Pictures.
  5. Resize the image by dragging a corner handle while holding Shift, so the proportions stay square. A skewed or stretched QR code often will not scan.
  6. Repeat for each value. For a few dozen codes this is fine; for hundreds, use the add-in method instead.
  7. Save the workbook, then test every code with a phone camera before you print or share. Scan at normal viewing distance and in the light you expect people to use.
\n

Method 2: Use a barcode add-in that fills cells

\n
  1. Open the workbook and go to Insert > Get Add-ins (called Office Add-ins in some builds).
  2. Search for a barcode or QR add-in from a reputable publisher, review what permissions it requests, and click Add. If your organisation blocks add-ins, this step will fail — that is a policy restriction, not a fault in Excel.
  3. Follow the add-in's own task pane to select the column of values and choose QR as the barcode type.
  4. Point the add-in at an output column. It will usually insert an IMAGE-formula or a set of generated images next to each value.
  5. Change a source value and check that the code refreshes. Some add-ins only regenerate when you click a refresh or regenerate button.
  6. Copy the result as values or keep the formulas, depending on whether you need static images. Formulas that call an online service stop working when the reader is offline.
\n

Method 3: ActiveX barcode control (Windows desktop only)

\n
  1. Open Excel on Windows and make sure the Developer tab is visible: File > Options > Customize Ribbon, then tick Developer in the right-hand list.
  2. Go to Developer > Insert > More Controls and look for the Microsoft Barcode Control. If it is not listed, the control is not installed on your machine and you cannot use this method.
  3. Draw the control on the sheet, then right-click it and open Properties to set the style to a QR type and paste the value into the linked cell.
  4. Test the code immediately with a phone. ActiveX controls only render in desktop Windows Excel, so anyone opening the file on a Mac or in the browser will see a placeholder at best.
\n

Common Mistakes

  • Stretching the image out of square. Always resize from a corner, never from an edge handle.
  • Encoding values with typos. A QR code is unforgiving: one wrong character in a URL sends people to the wrong page, and you will only find out after printing.
  • Using too little contrast. Dark modules on a light background scan reliably; inverted or low-contrast codes often fail outdoors.
  • Putting the image on top of cell borders and letting it cover neighbouring text, which makes the sheet hard to read.
  • Relying on a formula that fetches images from a website — those break when the workbook is opened offline or shared with someone whose account lacks access.
\n

Tips

  • Keep a short text column beside each code so anyone can verify what it encodes by eye.
  • Leave a white margin (quiet zone) of about four modules around the code; generators usually add it, but cropping removes it.
  • Print a test page at the actual size you will use. Codes that scan on screen sometimes fail when shrunk to a label.
  • For Wi-Fi codes, use the standard WIFI: format the generator offers instead of typing the password as free text, so phones recognise it and prompt to join.
  • If you need many codes, build the source list once in a column and treat that list as the master. Replacing a code is then a matter of regenerating one image.
\n

Troubleshooting

  • The phone will not scan it. Check the square aspect ratio, the quiet zone, and the print contrast. Zoom in on the code and try again, then regenerate at a larger size.
  • The code scans but opens the wrong link. Open the source cell and compare it character by character, including http versus https and any trailing slash.
  • The add-in is missing from Get Add-ins. Your organisation may block add-ins. Ask your administrator, or fall back to the image-import method.
  • Images show as red X or blank boxes. The files were moved or the workbook was sent without embedded pictures. Reinsert them from the original downloads.
  • Codes broke after sharing the file. Formula-based image services may need a signed-in account. Replace formulas with pasted pictures before sending.
  • Developer tab has no barcode control. The control is not installed; use another method rather than hunting for a download from an unofficial source.
\n

Frequently Asked Questions

Does Excel have a built-in QR code function?

No. There is no QUERY or QR worksheet function. You generate the code with an add-in, an ActiveX control, or an external generator and insert the image.

Can I make QR codes on Excel for Mac or the web?

Not with ActiveX controls. Use images generated outside Excel, or an add-in that does not depend on ActiveX, if one is available to you.

Can a QR code update when a cell changes?

Only through an add-in that regenerates it. A picture you inserted manually is static and must be replaced by hand.

What should I encode in a QR code?

Anything a scanner can read as text: a URL, an email address, a phone number, a Wi-Fi login in the standard WIFI: format, or an asset ID. Keep it short where possible, since longer content makes a denser, harder-to-scan code.

Is it safe to use free generators?

Treat the content as public. Do not encode passwords, card numbers or personal data into a code made by an unknown service, and check the site uses HTTPS before pasting internal links.