Loncat ke daftar isi utama

Bagaimana cara membuat kode qr berdasarkan nilai sel di Excel?

Apakah Anda tahu cara membuat kode QR berdasarkan nilai sel tertentu di Excel? Artikel ini akan menunjukkan kepada Anda metode untuk mencapainya secara detail.

Buat kode QR berdasarkan nilai sel dengan Kontrol Barcode dan kode VBA
Mudah membuat beberapa kode QR secara massal berdasarkan nilai sel dengan alat yang luar biasa


Buat kode QR berdasarkan nilai sel dengan Kontrol Barcode dan kode VBA

Kontrol Barcode dapat membantu Anda membuat kode QR dengan cepat berdasarkan nilai sel di Excel. Silakan lakukan sebagai berikut.

1. Buka lembar kerja yang berisi nilai sel yang akan Anda buat berdasarkan Kode QR.

2. klik Pengembang > Menyisipkan > Kontrol lebih. Lihat tangkapan layar:

3. Dalam Kontrol Lainnya jendela, periksa Kontrol Kode Batang Microsoft 16.0 or Kontrol Kode Batang Microsoft 15.0.

4. Jika Anda tidak menemukan Kontrol Kode Batang di jendela Kontrol Lainnya atau Kontrol Kode Batang bukan 16.0 atau 15.0, Anda perlu mengunduh file kontrol kode batang dengan mengklik tautan ini: unduh kontrol barcode. Jika terdapat Barcode Control 16.0 atau 15.0 di jendela More Controls Anda, langsung saja ke bawah langkah 10.

Setelah mengunduh file, buka zip, lalu perbarui Kontrol Kode Batang dengan kontrol kode batang yang diunduh di Excel Anda sebagai berikut.

5. Tutup semua buku kerja Excel Anda, buka Start bagian, temukan Excel aplikasi dan klik kanan padanya, lalu pilih Run as administrator dari menu konteks. Lihat tangkapan layar:

6. Dalam pembukaan User Account Control kotak dialog, klik Yes .

7. Kemudian workbook baru dibuat. Silakan klik Pengembang > Menyisipkan > Kontrol lebih. Lihat tangkapan layar:

8. Dalam Kontrol Lainnya window, klik Daftar Kustom , cari dan pilih salah satu file kode qr OCX yang diunduh lalu klik Open tombol. Lihat tangkapan layar:

9. Klik OK tombol saat mengembalikan Kontrol Lainnya jendela untuk menyelesaikan Kontrol Kode Batang diperbarui. Kemudian buka kembali buku kerja yang berisi nilai sel yang akan Anda buat berdasarkan Kode QR.

10. Klik kanan tab lembar dan klik Lihat kode dari menu konteks untuk membuka Microsoft Visual Basic untuk Aplikasi jendela. Kemudian salin dan tempel kode VAB di bawah ini ke jendela Kode. Dan terakhir tekan lain + Q kunci untuk keluar dari Microsoft Visual Basic untuk Aplikasi jendela.

Kode VBA: Buat kode QR di Excel

Sub setQR()
'Updated by Extendoffice 2018/8/22
    Dim xSRg As Range
    Dim xRRg As Range
    Dim xObjOLE As OLEObject
    On Error Resume Next
    Set xSRg = Application.InputBox("Please select the cell you will create QR code based on", "Kutools for Excel", , , , , , 8)
    If xSRg Is Nothing Then Exit Sub
    Set xRRg = Application.InputBox("Select a cell to place the QR code", "Kutools for Excel", , , , , , 8)
    If xRRg Is Nothing Then Exit Sub
    Application.ScreenUpdating = False
    Set xObjOLE = ActiveSheet.OLEObjects.Add("BARCODE.BarCodeCtrl.1")
    xObjOLE.Object.Style = 11
    xObjOLE.Object.Value = xSRg.Text
    ActiveSheet.Shapes.Item(xObjOLE.Name).Copy
    ActiveSheet.Paste xRRg
    xObjOLE.Delete
    Application.ScreenUpdating = True
End Sub

11. klik Pengembang > Menyisipkan > Tombol (Kontrol Formulir) seperti gambar di bawah ini.

12. Gambarlah tombol ke lembar kerja saat ini. Dalam bermunculan Tetapkan Makro dialog, pilih setQR di dalam kotak dan kemudian klik OK .

13. Matikan Mode Desain dengan mengklik Pengembang > Mode Desain.

14. Klik tombol, di pembukaan Kutools untuk Excel dialog, pilih sel tempat Anda akan membuat Kode QR dan klik OK.

15. Di kedua Kutools untuk Excel dialog, pilih sel untuk menempatkan Kode QR. Lihat tangkapan layar:

Kemudian Kode QR akan segera dimasukkan ke dalam sel yang ditentukan. Ulangi langkah 14 hingga 15 untuk menyelesaikan semua Kode QR yang dibuat. Lihat tangkapan layar:


Mudah membuat beberapa kode QR secara massal berdasarkan nilai sel dengan alat yang luar biasa

Sejujurnya, metode di atas tidak mudah untuk ditangani karena memiliki keterbatasannya sendiri. Di sini sangat direkomendasikan Masukkan Kode QR fitur dari Kutools untuk Excel. Fitur ini dapat membantu Anda dengan cepat menyisipkan kode QR secara massal berdasarkan nilai sel tertentu di Excel dengan beberapa klik saja. Silakan lakukan hal berikut untuk menyelesaikannya.

Sebelum melamar Kutools untuk Excel, Mohon unduh dan instal terlebih dahulu.

1. Pertama, siapkan nilai yang ingin Anda buat berdasarkan kode QR.

2. klik Kutools > Menyisipkan > Masukkan Kode QR.

Tip: Jika Anda tidak dapat menemukan fitur dengan jalur ini, silakan tekan tombol lain + S tombol secara bersamaan untuk membuka Cari Fungsi Kutools kotak, ketik manual Kode QR di kotak pencarian, maka Anda dapat melihat Masukkan Kode QR fitur terdaftar, cukup klik untuk mengaktifkan fitur. Lihat tangkapan layar:

Sekarang panel Sisipkan Kode QR ditampilkan di sisi kanan buku kerja.

3. Dalam Masukkan Kode QR panel, Anda perlu mengkonfigurasi sebagai berikut.

3.1) Di Rentang Data kotak, pilih rentang sel yang berisi nilai yang ingin Anda buat Kode QR berdasarkan;
3.2) Di Sisipkan Rentang kotak, pilih rentang sel kosong untuk menampilkan kode QR;
3.3) Di Opsi bagian, konfigurasikan ukuran, warna garis, warna latar belakang dan Tingkat Koreksi Kesalahan untuk kode QR yang Anda butuhkan;
Catatan: Ukuran kode QR tidak boleh melebihi 500 piksel.
3.4) Klik Menghasilkan tombol. Lihat tangkapan layar:

4. Kemudian a Kutools untuk Excel kotak dialog muncul, klik OK.

5. Kemudian kode QR dibuat secara bersamaan. Anda harus menutup secara manual Masukkan Kode QR panel jika selesai membuat semua kode QR.

Klik untuk tahu lebih banyak tentang fitur ini ...


Artikel terkait:

Alat Produktivitas Kantor Terbaik

馃 Kutools AI Ajudan: Merevolusi analisis data berdasarkan: Eksekusi Cerdas   |  Hasilkan Kode  |  Buat Rumus Khusus  |  Analisis Data dan Hasilkan Grafik  |  Aktifkan Fungsi Kutools...
Fitur Populer: Temukan, Sorot, atau Identifikasi Duplikat   |  Hapus Baris Kosong   |  Gabungkan Kolom atau Sel tanpa Kehilangan Data   |   Putaran tanpa Formula ...
Pencarian Super: VLookup Beberapa Kriteria    VLookup Nilai Berganda  |   VLookup di Beberapa Lembar   |   Pencarian Fuzzy ....
Daftar Drop-down Lanjutan: Buat Daftar Drop Down dengan Cepat   |  Daftar Drop Down yang Bergantung   |  Multi-pilih Drop Down List ....
Manajer Kolom: Tambahkan Jumlah Kolom Tertentu  |  Pindahkan Kolom  |  Alihkan Status Visibilitas Kolom Tersembunyi  |  Bandingkan Rentang & Kolom ...
Fitur Unggulan: Fokus Kisi   |  Tampilan Desain   |   Bar Formula Besar    Manajer Buku Kerja & Lembar   |  Perpustakaan Sumberdaya (Teks otomatis)   |  Pemetik tanggal   |  Gabungkan Lembar Kerja   |  Enkripsi/Dekripsi Sel    Kirim Email berdasarkan Daftar   |  Filter Super   |   Filter Khusus (filter tebal/miring/coret...) ...
15 Perangkat Teratas12 Teks Tools (Tambahkan Teks, Hapus Karakter, ...)   |   50 + Grafik jenis (Gantt Chart, ...)   |   40+ Praktis Rumus (Hitung usia berdasarkan ulang tahun, ...)   |   19 Insersi Tools (Masukkan Kode QR, Sisipkan Gambar dari Jalur, ...)   |   12 Konversi Tools (Angka ke Kata, Konversi Mata Uang, ...)   |   7 Gabungkan & Pisahkan Tools (Lanjutan Gabungkan Baris, Pisahkan Sel, ...)   |   ... dan banyak lagi

Tingkatkan Keterampilan Excel Anda dengan Kutools for Excel, dan Rasakan Efisiensi yang Belum Pernah Ada Sebelumnya. Kutools for Excel Menawarkan Lebih dari 300 Fitur Lanjutan untuk Meningkatkan Produktivitas dan Menghemat Waktu.  Klik Di Sini untuk Mendapatkan Fitur yang Paling Anda Butuhkan...

Deskripsi Produk


Tab Office Membawa antarmuka Tab ke Office, dan Membuat Pekerjaan Anda Jauh Lebih Mudah

  • Aktifkan pengeditan dan pembacaan tab di Word, Excel, PowerPoint, Publisher, Access, Visio, dan Project.
  • Buka dan buat banyak dokumen di tab baru di jendela yang sama, bukan di jendela baru.
  • Meningkatkan produktivitas Anda sebesar 50%, dan mengurangi ratusan klik mouse untuk Anda setiap hari!
Comments (38)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Is it possible to make a payment qr code in excel?
f.e. In cell A1 I've an amout of 10 euro, and in cell B2 I want to have an qr code so anyone can pay me with the qr code?

Thanks.
This comment was minimized by the moderator on the site
Hi Ruben,

Thank you for reaching out with your question. While Kutools for Excel does feature QR code generation, creating a payment QR code directly in Excel for transactional purposes is beyond the scope of this feature. Payment QR codes usually require integration with financial services or payment platforms to ensure secure transactions. I recommend exploring services specifically designed for creating payment QR codes, such as those offered by banks or digital payment systems. These platforms can generate a QR code linked to your payment details securely. Once you have the payment QR code, you could then include it in your Excel document as an image.
This comment was minimized by the moderator on the site
Hello

The download link provided in step 4 appears to be only Microsoft Barcode Control 14.0. Can anyone suggest a correct link for 16.0 please?

Thank you.
This comment was minimized by the moderator on the site
1 Sheets waar in de cellen van de rij random QR codes binnen komen. Waarvan elke QR code automatisch de juiste Sheets openend?
Of de BVA commando codes van de Button om de koppeling maken naar een andere sheets.
Dan ben erg dankbaar voor.
(dit is voor vrijwilligerswerk)

Groetjes,
H. van Schaijk
This comment was minimized by the moderator on the site
Hi H. van Schaijk,
I can't fix this problem. Sorry about that.
This comment was minimized by the moderator on the site
Hi folks,
Below code works fine with me, which is linked to cell range & generates the QR at each row cell 5000 nos, however I would like to stop the QR object generation if the reference cell value is zero / otherway round should generate the QR at adjucent cell if the value at reference cell is more than zero or <>""

Please seek experts assistance!!

thank you in advance

Sub Gen_StockOut_QR()
MsgBox ("Will Generate QR Code for Stock_Out Items at In@Out Sheet")
Sheets("In@Out_Data").Select
ActiveSheet.Unprotect Password:=" "
'Column range set at QR_Code
Range("QR_Code").Select

For Each cell In Selection
'cell.Offset(0, 23).Select ' 1 indicates the position of excel column A1 from the formula/webaddress/site/characters to be used to generate QR code
cell.Offset(0, 0).Select

' My case QRCode is at column 24 hence 24 as column from A1, QR Size 100*100
FilePath = "http://chart.googleapis.com/chart?chs=100x100&&cht=qr&chl=" & WorksheetFunction.EncodeURL(cell.Value) ' here is the cell value

With ActiveSheet.Pictures.Insert(FilePath)
'.ShapeRange.ScaleWidth 0.95, msoFalse, msoScaleFromTopLeft
'.ShapeRange.ScaleHeight 0.95, msoFalse, msoScaleFromTopLeft

End With
Next cell
End Sub
This comment was minimized by the moderator on the site
Interesting article - thank you.  How do I remove the custom control from the list please?
This comment was minimized by the moderator on the site
Hi,Do you mean to remove the Form Control inserted in the VBA code method? If so, you just need to right click it (when there is a context menu listed, click anywhere outside it to hide the context menu), and then press Delete to remove it.
This comment was minimized by the moderator on the site
Ol谩! Para mim, nenhum dos coment谩rios ou esse post funcionou corretamente, mas utilizando o Visual Basic com o c贸digo que deixarei abaixo funcionou, pois criou uma fun莽茫o para mim. E para usar a fun莽茫o 茅 s贸 abrir a planilha e digitar: "=QrCode("c茅lula desejada")"




Function QrCode(codetext As String)
Dim URL As String, MyCell As Range
'Para gerar o c贸digo, precisa a m谩quina ter acesso a internet
Set MyCell = Application.Caller
URL = "https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & codetext
On Error Resume Next
ActiveSheet.Pictures("QR_" & MyCell.Address(False, False)).Delete
On Error GoTo 0
ActiveSheet.Pictures.Insert(URL).Select
With Selection.ShapeRange(1)
.PictureFormat.CropLeft = 15
.PictureFormat.CropRight = 15
.PictureFormat.CropTop = 15
.PictureFormat.CropBottom = 15
.Name = "QR_" & MyCell.Address(False, False)
.Left = MyCell.Left + 2
.Top = MyCell.Top + 2
End With
QrCode = ""
End Function
This comment was minimized by the moderator on the site
Wie l枚sche ich die QR Code Grafik wieder ? wenn ich mit den Skript Wie erstelle ich einen QR-Code basierend auf dem Zellenwert in Excel? einen QR Code erzeugt habe ?
This comment was minimized by the moderator on the site
Hi All,

I modified the VBA code for creation a multi QR codes from selection in excel column

Follow until step 10 then add this code

Sub setQR()

Dim xSRg As Range
Dim xRRg As Range
Dim xObjOLE As OLEObject
On Error Resume Next
Dim srcSelection As Range
Dim srcCell As String
For Each srcSelection In Application.Selection
Dim qrCelltoupdate As String
Dim qrTxt As String
qrCelltoupdate = srcSelection.Offset(0, 1).Address
qrTxt = srcSelection.Text
Worksheets("Sheet1").Range(qrCelltoupdate).Select
Application.ScreenUpdating = False
Set xObjOLE = ActiveSheet.OLEObjects.Add("BARCODE.BarCodeCtrl.1")
xObjOLE.Object.Style = 11
xObjOLE.Object.Value = qrTxt
ActiveSheet.Shapes.Item(xObjOLE.Name).Copy
ActiveSheet.Paste
xObjOLE.Delete
Next srcSelection
'Create Qr code from selection multi cells
End Sub


In step 12
Assign Macro
Chose: Sheet1.setQR

QR codes will be populated in next column

Hope that helps for you all
This comment was minimized by the moderator on the site
Hi ChavdarHarchev.
First of all thank You very much for Your nice work.

Is it possible for You to show how the VBA code looks like when it is finished?
Best regards
Pierre Galuszka.
This comment was minimized by the moderator on the site
Hi All,
I modified the VBA code for creation a multi QR codes from selection in excel column
Follow until step 10 then add this code
Sub setQR()

Dim xSRg As Range
Dim xRRg As Range
Dim xObjOLE As OLEObject
On Error Resume Next
Dim srcSelection As Range
Dim srcCell As String
For Each srcSelection In Application.Selection
Dim qrCelltoupdate As String
Dim qrTxt As String
qrCelltoupdate = srcSelection.Offset(0, 1).Address
qrTxt = srcSelection.Text
Worksheets("Sheet1").Range(qrCelltoupdate).Select
Application.ScreenUpdating = False
Set xObjOLE = ActiveSheet.OLEObjects.Add("BARCODE.BarCodeCtrl.1")
xObjOLE.Object.Style = 11
xObjOLE.Object.Value = qrTxt
ActiveSheet.Shapes.Item(xObjOLE.Name).Copy
ActiveSheet.Paste
xObjOLE.Delete
Next srcSelection
'Create Qr code from selection multi cells
End Sub


In step 12 Assign Macro Chose: Sheet1.setQR
QR codes will be populated in next column
Hope that helps for you all
This comment was minimized by the moderator on the site
I didn't have "Microsoft Barcode Control 16.0" so I down loaded per instruction. And open Excel with Admin mode. Then try to "Register Custom" . But I opened Barcode control folder and select MSBCODE964,OCX. Then there is error message came out. It said "The selected file does not contain self-registrating ActiveX control". What it means? What is the problem. And how can I install that?
This comment was minimized by the moderator on the site
1)Click File > Options.

2)Click Trust Center > Trust Center Settings > ActiveX Settings.

Click the options below, and then click OK.
* Enable all controls without restrictions and without prompting (not recommended)
3)Click Ok
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations