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.
\nWhat 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.
Step-by-Step
\nMethod 1: Import QR images into cells (works everywhere)
\n- 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.
- 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.
- Download the image as PNG. Avoid JPG, because compression artefacts blur the modules and scanners struggle with them.
- 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.
- 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.
- Repeat for each value. For a few dozen codes this is fine; for hundreds, use the add-in method instead.
- 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.
Method 2: Use a barcode add-in that fills cells
\n- Open the workbook and go to Insert > Get Add-ins (called Office Add-ins in some builds).
- 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.
- Follow the add-in's own task pane to select the column of values and choose QR as the barcode type.
- 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.
- Change a source value and check that the code refreshes. Some add-ins only regenerate when you click a refresh or regenerate button.
- 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.
Method 3: ActiveX barcode control (Windows desktop only)
\n- Open Excel on Windows and make sure the Developer tab is visible: File > Options > Customize Ribbon, then tick Developer in the right-hand list.
- 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.
- 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.
- 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.
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.
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.
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.
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.