ไปยังเนื้อหาหลัก

วิธีสร้างรหัส QR ตามค่าเซลล์ใน Excel

คุณรู้วิธีสร้างรหัส QR ตามค่าเซลล์เฉพาะใน Excel หรือไม่? บทความนี้จะแสดงวิธีการเพื่อให้บรรลุโดยละเอียด

สร้างรหัส QR ตามค่าเซลล์ด้วยการควบคุมบาร์โค้ดและรหัส VBA
สร้างรหัส QR จำนวนมากอย่างง่ายดายตามค่าของเซลล์ด้วยเครื่องมือที่น่าทึ่ง


สร้างรหัส QR ตามค่าเซลล์ด้วยการควบคุมบาร์โค้ดและรหัส VBA

การควบคุมบาร์โค้ดสามารถช่วยคุณสร้างโค้ด QR ได้อย่างรวดเร็วตามค่าเซลล์ใน Excel กรุณาดำเนินการดังนี้

1. เปิดแผ่นงานที่มีค่าเซลล์ที่คุณจะสร้างรหัส QR ตาม

2 คลิก ผู้พัฒนา > สิ่งที่ใส่เข้าไป > การควบคุมเพิ่มเติม. ดูภาพหน้าจอ:

3 ใน การควบคุมเพิ่มเติม ให้ตรวจสอบไฟล์ การควบคุมบาร์โค้ดของ Microsoft 16.0 or การควบคุมบาร์โค้ดของ Microsoft 15.0.

4. หากคุณไม่พบการควบคุมบาร์โค้ดในหน้าต่างการควบคุมเพิ่มเติมหรือการควบคุมบาร์โค้ดไม่ใช่ 16.0 หรือ 15.0 คุณต้องดาวน์โหลดไฟล์ควบคุมบาร์โค้ดโดยคลิกที่ลิงก์นี้: ดาวน์โหลดการควบคุมบาร์โค้ด. หากมี Barcode Control 16.0 หรือ 15.0 ในหน้าต่าง More Controls ให้ข้ามไปที่ด้านล่าง ขั้นตอนที่ 10.

หลังจากดาวน์โหลดไฟล์แล้วให้คลายซิปไฟล์แล้วอัปเดตการควบคุมบาร์โค้ดด้วยตัวควบคุมบาร์โค้ดที่ดาวน์โหลดมาใน Excel ของคุณดังต่อไปนี้

5. ปิดสมุดงาน Excel ทั้งหมดของคุณไปที่ไฟล์ เริ่มต้น ค้นหา Excel และคลิกขวาที่แอปจากนั้นเลือก เรียกใช้ในฐานะผู้ดูแล จากเมนูบริบท ดูภาพหน้าจอ:

6. ในการเปิด ควบคุมบัญชีผู้ใช้ ใหคลิกปุ the ม ใช่ ปุ่ม

7. จากนั้นสร้างสมุดงานใหม่ กรุณาคลิก ผู้พัฒนา > สิ่งที่ใส่เข้าไป > การควบคุมเพิ่มเติม. ดูภาพหน้าจอ:

8 ใน การควบคุมเพิ่มเติม หน้าต่างคลิก ลงทะเบียนกำหนดเอง ค้นหาและเลือกไฟล์ OCX รหัส qr ที่ดาวน์โหลดมาจากนั้นคลิกไฟล์ จุดเปิด ปุ่ม. ดูภาพหน้าจอ:

9 คลิกที่ OK ปุ่มเมื่อส่งกลับไฟล์ การควบคุมเพิ่มเติม หน้าต่างเพื่อสิ้นสุดการควบคุมบาร์โค้ดที่อัปเดต จากนั้นเปิดสมุดงานอีกครั้งซึ่งมีค่าของเซลล์ที่คุณจะสร้างรหัส QR ตาม

10. คลิกขวาที่แท็บแผ่นงานแล้วคลิก ดูรหัส จากเมนูบริบทเพื่อเปิดไฟล์ Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง. จากนั้นคัดลอกและวางโค้ด VAB ด้านล่างลงในหน้าต่างรหัส และสุดท้ายกด อื่น ๆ + Q ปุ่มเพื่อออกจากไฟล์ Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

รหัส VBA: สร้างรหัส QR ใน 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 คลิก ผู้พัฒนา > สิ่งที่ใส่เข้าไป > ปุ่ม (การควบคุมแบบฟอร์ม) ดังภาพด้านล่างที่แสดง

12. วาดปุ่มลงในแผ่นงานปัจจุบัน ในการโผล่ขึ้นมา กำหนดมาโคร ใหเลือก ชุดQR ในกล่องจากนั้นคลิกไฟล์ OK ปุ่ม

13 ปิดกล้อง โหมดการออกแบบ โดยคลิกที่ ผู้พัฒนา > โหมดการออกแบบ.

14. คลิกปุ่มในช่องเปิด Kutools สำหรับ Excel กล่องโต้ตอบเลือกเซลล์ที่คุณจะสร้างรหัส QR ตามและคลิก OK.

15. ในวินาทีที่ Kutools สำหรับ Excel ไดอะล็อกเลือกเซลล์เพื่อวาง QR Code ดูภาพหน้าจอ:

จากนั้น QR Code จะถูกแทรกลงในเซลล์ที่ระบุทันที ทำซ้ำขั้นตอนที่ 14 ถึง 15 เพื่อสร้าง QR Code ทั้งหมดให้เสร็จ ดูภาพหน้าจอ:


สร้างรหัส QR จำนวนมากอย่างง่ายดายตามค่าของเซลล์ด้วยเครื่องมือที่น่าทึ่ง

ตามจริงแล้ว วิธีการข้างต้นไม่ง่ายเลยที่จะรับมือ เพราะมันมีข้อจำกัดในตัวเอง ที่นี่ขอแนะนำ ใส่ QR Code คุณลักษณะของ Kutools สำหรับ Excel. คุณลักษณะนี้สามารถช่วยให้คุณแทรกโค้ด QR เป็นกลุ่มได้อย่างรวดเร็วตามค่าเซลล์ที่ระบุใน Excel ด้วยการคลิกหลายครั้งเท่านั้น โปรดทำดังต่อไปนี้เพื่อให้เสร็จสิ้น

ก่อนที่จะใช้ Kutools สำหรับ Excelโปรด ดาวน์โหลดและติดตั้งในตอนแรก.

1. ขั้นแรก เตรียมค่าของคุณที่คุณต้องการสร้างรหัส QR ตาม

2 คลิก Kutools > สิ่งที่ใส่เข้าไป > ใส่ QR Code.

ทิปส์: หากคุณไม่พบคุณลักษณะที่มีเส้นทางนี้ โปรดกด อื่น ๆ + S พร้อมกันเพื่อเปิดไฟล์ ค้นหาฟังก์ชั่น Kutools กล่อง, พิมพ์ด้วยตนเอง คิวอาร์โค้ด ในช่องค้นหา คุณจะเห็น ใส่ QR Code คุณสมบัติอยู่ในรายการ เพียงคลิกเพื่อเปิดใช้งานคุณสมบัติ ดูภาพหน้าจอ:

ตอนนี้บานหน้าต่างแทรกรหัส QR จะปรากฏขึ้นที่ด้านขวาของเวิร์กบุ๊ก

3 ใน ใส่ QR Code บานหน้าต่างคุณต้องกำหนดค่าดังนี้

3.1) ใน ช่วงข้อมูล กล่องเลือกช่วงของเซลล์ที่มีค่าที่คุณต้องการสร้างรหัส QR ตาม;
3.2) ใน แทรกช่วง กล่อง เลือกช่วงของเซลล์ว่างเพื่อส่งออกรหัส QR;
3.3) ใน Options ส่วนกำหนดค่า ขนาด สีเส้น สีพื้นหลัง และ ระดับการแก้ไขข้อผิดพลาด สำหรับรหัส QR ตามที่คุณต้องการ
หมายเหตุ ขนาดของรหัส QR ต้องไม่เกิน 500 พิกเซล
3.4) คลิกปุ่ม ผลิต ปุ่ม. ดูภาพหน้าจอ:

4. จากนั้นก Kutools สำหรับ Excel กล่องโต้ตอบปรากฏขึ้นคลิก ตกลง

5. จากนั้นรหัส QR จะถูกสร้างขึ้นพร้อมกัน คุณต้องปิด . ด้วยตนเอง ใส่ QR Code บานหน้าต่างหากเสร็จสิ้นการสร้างรหัส QR ทั้งหมด

คลิกที่นี่เพื่อ เรียนรู้เพิ่มเติมเกี่ยวกับคุณสมบัตินี้...


บทความที่เกี่ยวข้อง:

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
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