Skip i'r prif gynnwys

Sut i greu cod qr yn seiliedig ar werth celloedd yn Excel?

Ydych chi'n gwybod sut i greu cod QR yn seiliedig ar werth celloedd penodol yn Excel? Bydd yr erthygl hon yn dangos dull i chi ei gyflawni mewn manylion.

Creu cod QR yn seiliedig ar werth celloedd gyda Rheoli Cod Bar a chod VBA
Yn hawdd creu codau QR lluosog mewn swmp yn seiliedig ar werthoedd celloedd gydag offeryn anhygoel


Creu cod QR yn seiliedig ar werth celloedd gyda Rheoli Cod Bar a chod VBA

Gall y Rheoli Cod Bar eich helpu chi i greu cod QR yn gyflym yn seiliedig ar werth celloedd yn Excel. Gwnewch fel a ganlyn.

1. Mae agor y daflen waith yn cynnwys y gwerth cell y byddwch chi'n creu Cod QR yn seiliedig arno.

2. Cliciwch Datblygwr > Mewnosod > Mwy o Reolaeth. Gweler y screenshot:

3. Yn y Mwy o Reolaethau ffenestr, gwiriwch am y Rheoli Cod Bar Microsoft 16.0 or Rheoli Cod Bar Microsoft 15.0.

4. Os na ddaethoch o hyd i'r Rheolaeth Cod Bar yn y ffenestr Mwy o Reolaethau neu os nad yw'r Rheolaeth Cod Bar yn 16.0 na 15.0, mae angen i chi lawrlwytho'r ffeil rheoli cod bar trwy glicio ar y dolenni hyn: lawrlwytho rheolaeth cod bar. Os oes Rheoli Cod Bar 16.0 neu 15.0 yn eich ffenestr Mwy o Reolaethau, neidiwch i isod cam 10.

Ar ôl lawrlwytho'r ffeil, dadsipiwch hi ac yna diweddarwch y Rheolaeth Cod Bar gyda'r rheolaeth cod bar wedi'i lawrlwytho yn eich Excel fel a ganlyn.

5. Caewch eich holl lyfrau gwaith Excel, ewch i'r dechrau adran, dewch o hyd i'r Excel ap a chlicio arno, yna dewiswch Rhedeg fel gweinyddwr o'r ddewislen cyd-destun. Gweler y screenshot:

6. Yn yr agoriad Ddefnyddiwr Adla blwch deialog, cliciwch y Ydy botwm.

7. Yna crëir llyfr gwaith newydd. Cliciwch Datblygwr > Mewnosod > Mwy o Reolaeth. Gweler y screenshot:

8. Yn y Mwy o Reolaethau ffenestr, cliciwch Cofrestru Custom botwm, darganfyddwch a dewiswch un o'r ffeil qX cod OCX sydd wedi'i lawrlwytho ac yna cliciwch ar y agored botwm. Gweler y screenshot:

9. Cliciwch ar y OK botwm pan fydd yn dychwelyd y Mwy o Reolaethau ffenestr i orffen y Rheolaeth Cod Bar wedi'i diweddaru. Yna mae ailagor y llyfr gwaith yn cynnwys y gwerthoedd celloedd y byddwch chi'n creu Codau QR yn seiliedig arnyn nhw.

10. De-gliciwch y tab dalen a chlicio Gweld y Cod o'r ddewislen cyd-destun i agor y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr. Yna copïwch a gludwch islaw cod VAB i mewn i ffenestr y Cod. Ac yn olaf pwyswch y Alt + Q allweddi i adael y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.

Cod VBA: Creu cod QR yn 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. Cliciwch Datblygwr > Mewnosod > Botwm (Rheoli Ffurflen) fel y dangosir isod screenshot.

12. Tynnwch botwm i mewn i'r daflen waith gyfredol. Yn y popping up Neilltuo Macro deialog, dewiswch setQR yn y blwch ac yna cliciwch ar y OK botwm.

13. Trowch oddi ar y Modd Dylunio trwy glicio Datblygwr > Modd Dylunio.

14. Cliciwch y botwm, yn yr agoriad Kutools ar gyfer Excel deialog, dewiswch y gell y byddwch chi'n creu Cod QR yn seiliedig arni a chlicio OK.

15. Yn yr ail Kutools ar gyfer Excel deialog, dewiswch gell i osod y Cod QR. Gweler y screenshot:

Yna bydd y Cod QR yn cael ei fewnosod mewn cell benodol ar unwaith. Ailadroddwch gam 14 i 15 i orffen yr holl God QR a grëwyd. Gweler y screenshot:


Yn hawdd creu codau QR lluosog mewn swmp yn seiliedig ar werthoedd celloedd gydag offeryn anhygoel

I fod yn onest, nid yw'r dull uchod yn hawdd ei drin gan fod ganddo ei gyfyngiad ei hun. Yma argymhellodd yn gryf y Mewnosod Cod QR nodwedd o Kutools ar gyfer Excel. Gall y nodwedd hon eich helpu i fewnosod codau QR mewn swmp yn gyflym yn seiliedig ar werthoedd celloedd penodedig yn Excel gyda sawl clic yn unig. Gwnewch fel a ganlyn i wneud hynny.

Cyn gwneud cais Kutools ar gyfer Excel, os gwelwch yn dda ei lawrlwytho a'i osod yn gyntaf.

1. Yn gyntaf, paratowch eich gwerthoedd rydych chi am greu cod QR yn seiliedig arnyn nhw.

2. Cliciwch Kutools > Mewnosod > Mewnosod Cod QR.

Awgrym: Os na allwch ddod o hyd i'r nodwedd gyda'r llwybr hwn, pwyswch y Alt + S allweddi ar yr un pryd i agor y Chwilio Swyddogaethau Kutools blwch, teipiwch â llaw Cod QR yn y blwch chwilio, yna gallwch weld y Mewnosod Cod QR nodwedd wedi'i rhestru allan, cliciwch i actifadu'r nodwedd. Gweler y screenshot:

Nawr mae'r cwarel Mewnosod Cod QR wedi'i arddangos ar ochr dde'r llyfr gwaith.

3. Yn y Mewnosod Cod QR cwarel, mae angen i chi ffurfweddu fel a ganlyn.

3.1) Yn y Ystod Data blwch, dewiswch yr ystod o gelloedd sy'n cynnwys y gwerthoedd rydych chi am greu Cod QR yn seiliedig arnynt;
3.2) Yn y Mewnosod Ystod blwch, dewiswch ystod o gelloedd gwag i allbwn y cod QR;
3.3) Yn y Dewisiadau adran, ffurfweddwch y maint, lliw llinell, lliw cefndir ac Lefel Cywiro Gwall ar gyfer y cod QR yn ôl yr angen;
Nodyn: Ni all maint y cod QR fod yn fwy na 500 picsel.
3.4) Cliciwch y cynhyrchu botwm. Gweler y screenshot:

4. Yna a Kutools ar gyfer Excel blwch deialog yn ymddangos, cliciwch OK.

5. Yna mae'r codau QR yn cael eu creu ar yr un pryd. Mae angen i chi gau'r Mewnosod Cod QR cwarel os gorffen gorffen creu'r holl godau QR.

Cliciwch i gwybod mwy am y nodwedd hon ...


Erthygl gysylltiedig:

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
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