Check your Excel has IMAGE
The formula needs Excel's IMAGE function, which Microsoft lists for Excel for Microsoft 365 on Windows and Mac, Excel for the web, Excel 2024, and Excel on iPhone and Android (Microsoft: IMAGE function). Excel 2021, 2019 and 2016 don't have it. On those, skip to the copy-and-paste route at the end of this page.
The formula, piece by piece
=IMAGE("https://qrcodesforever.com/qr.png?url="&A2)
https://qrcodesforever.com/qr.png is our image address, which draws a QR code as a PNG. ?url= says the code is for a web link, &A2 adds the link from cell A2, and IMAGE shows the picture inside the cell.
IMAGE takes three optional extras: alt text, a sizing mode and a size. Mode 0 fits the image inside the cell and keeps it square, and mode 3 lets you set the height and width in pixels:
=IMAGE("https://qrcodesforever.com/qr.png?url="&A2, "QR code for "&A2, 3, 150, 150)
Keep the height and width equal; mode 1 fills the cell and ignores the shape, which squashes the code.
The & problem, tested
Many shop and campaign links contain an &, and an & inside our image address starts a new setting. We put https://shop.com/item?id=4&color=red into the formula above without any encoding and decoded the image our server sent back. The code said https://shop.com/item?id=4. The color=red part was gone, and nothing on screen tells you.
On Excel for Windows, wrap the cell in ENCODEURL:
=IMAGE("https://qrcodesforever.com/qr.png?url="&ENCODEURL(A2))
That sends https%3A%2F%2Fshop.com%2Fitem%3Fid%3D4%26color%3Dred, and the decoded code matched the original link exactly. Microsoft says ENCODEURL is not available in Excel for the web or Excel for Mac (Microsoft: ENCODEURL), so on those, swap the two troublesome characters yourself:
=IMAGE("https://qrcodesforever.com/qr.png?url="&SUBSTITUTE(SUBSTITUTE(A2,"&","%26"),"#","%23"))
The # matters too: a browser or Excel never sends the part after # to a server, so an unencoded #section silently drops off.
One more limit from Microsoft: an IMAGE source address can be at most 255 characters. Our part takes 38, which leaves about 217 for your link, fewer once encoding turns each & or / into three characters. Very long links are better as image files from the bulk generator.
Codes for text instead of links
For SKUs, ticket numbers or anything that isn't a web address, use text=:
=IMAGE("https://qrcodesforever.com/qr.png?text="&A2)
Add &size=1024 to the address for a sharper print. The embed reference lists every option, and the Excel developer guide goes further.
What leaves your spreadsheet
Every cell you point the formula at is sent to our server inside the image address so we can draw it. Don't run it over passwords, customer details or anything else private. The generator on this page and the bulk generator both make the code in your browser and send nothing. The codes themselves are static, so a printed sheet keeps working even if Excel later can't load the image.
Older Excel, or a single code
Make the code with the generator at the top of this page, click Copy image, click a cell and press Ctrl+V (Cmd+V on Mac). The code floats over the grid; drag it into place. For a whole list, save the sheet as CSV and upload it to the bulk QR code generator, which returns one ZIP of images.