How to generate QR codes with Excel in Microsoft 365 or Google Sheets?


Introduction

In this article, we will learn how to generate QR codes with Excel in Microsoft 365 or in Google Sheets. With the help of the image function, which is available in Microsoft 365, users may quickly develop QR codes in worksheets. If you intend to use the image function in Excel 2019 or in an older version, then it is not available in them. However, users may develop VBA code in Excel versions to achieve this task. The simplest way for users is either to purchase Microsoft 365 software or sign up for a free one-month subscription online.

Example 1: To create QR codes in Excel

Step 1

Open a new worksheet in Excel in Microsoft 365. Assume the sample dataset as shown in below image −

Step 2

Enter the formula =IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="&B2&"") in the C2 cell and press the "Enter" key.

Image function Syntax

=IMAGE(src, [alt_txt], [size_number], [ht], [wt])

Explanation

  • The first parameter "src" of the image function is the source path where the QR code or any specific image is to be fetched.

  • The second parameter "alt_txt" is an optional parameter representing the different text to describe the image.

  • The third argument "size_number" denotes the dimensions of images, which is an optional argument. The range of size numbers is 0 to 3.

  • The fourth argument ht denotes the adjustable height of the image. It is also optional.

  • The fifth argument wt indicates the tailored width of the specific image. It is also optional.

As you can see the QR code is generated in the C2 cell.

Step 3

Drag the "+" sign visible in the bottom right corner of the C2 cell and drop it to the C11 cell to generate the QR code for the remaining cells.

Step 4

Therefore, the QR codes are displayed in the C column as highlighted below image −

Note − Repeat the same steps in Google Sheets to create the QR codes.

Conclusion

We would conclude that, due to image function, QR codes are easy to develop in the cells. Make sure that users have been provided the correct URL path of the source website where the QR code is to access inside the image function and embed in.

Updated on: 02-Nov-2023

293 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements