メインコンテンツへスキップ

Excelでセル値に基づいてqrコードを作成するにはどうすればよいですか?

Excelで特定のセル値に基づいてQRコードを作成する方法を知っていますか? この記事では、それを実現する方法を詳しく説明します。

バーコードコントロールとVBAコードを使用してセル値に基づいてQRコードを作成する
素晴らしいツールを使用して、セル値に基づいて複数のQRコードをまとめて簡単に作成できます


バーコードコントロールとVBAコードを使用してセル値に基づいてQRコードを作成する

バーコードコントロールを使用すると、Excelのセル値に基づいてQRコードをすばやく作成できます。 次のようにしてください。

1.ワークシートを開くと、QRコードを作成するセルの値が含まれています。

2。 クリック Developer > インセット > より多くのコントロール。 スクリーンショットを参照してください:

3。 の中に その他のコントロール ウィンドウ、 Microsoftバーコードコントロール16.0 or Microsoftバーコードコントロール15.0.

4. [その他のコントロール]ウィンドウでバーコードコントロールが見つからない場合、またはバーコードコントロールが16.0または15.0を検出しない場合は、次のリンクをクリックしてバーコードコントロールファイルをダウンロードする必要があります。 バーコードコントロールをダウンロード。 [その他のコントロール]ウィンドウにバーコードコントロール16.0または15.0がある場合は、以下にジャンプしてください。 ステップ1.

ファイルをダウンロードしたら、解凍してから、ダウンロードしたバーコードコントロールをExcelに次のように更新します。

5.すべてのExcelブックを閉じて、 開始 セクション、 Excel アプリを右クリックして、 管理者として実行. コンテキストメニューから。 スクリーンショットを参照してください:

6.オープニングで ユーザーアカウント制御 ダイアログボックスで 有り

7.次に、新しいワークブックが作成されます。 クリックしてください Developer > インセット > より多くのコントロール。 スクリーンショットを参照してください:

8。 の中に その他のコントロール ウィンドウ、クリック カスタム登録 ボタンをクリックし、ダウンロードしたqrコードOCXファイルのXNUMXつを見つけて選択し、[ Open ボタン。 スクリーンショットを参照してください:

9。 クリック OK 戻るときのボタン その他のコントロール 更新されたバーコードコントロールを終了するウィンドウ。 次に、ワークブックを再度開くと、QRコードの作成に基づくセル値が含まれています。

10。 シートタブを右クリックして、 コードを表示 コンテキストメニューから アプリケーション向け Microsoft Visual Basic 窓。 次に、以下のVABコードをコピーしてコードウィンドウに貼り付けます。 そして最後に 他の + Q 終了するためのキー アプリケーション向け Microsoft Visual Basic 窓。

VBAコード:ExcelでQRコードを作成する

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。 クリック Developer > インセット > ボタン(フォームコントロール) 以下のスクリーンショットのように。

12.現在のワークシートにボタンを描画します。 ポップアップで マクロの割り当て ダイアログ、選択 セットQR ボックスで、をクリックします OK

13。 オフにする デザインモード クリックして Developer > デザインモード.

14.開口部のボタンをクリックします Kutools for Excel ダイアログで、QRコードを作成するセルを選択してクリックします OK.

15番目に Kutools for Excel ダイアログで、QRコードを配置するセルを選択します。 スクリーンショットを参照してください:

その後、QRコードは指定されたセルにすぐに挿入されます。 手順14〜15を繰り返して、作成したすべてのQRコードを完成させます。 スクリーンショットを参照してください:


素晴らしいツールを使用して、セル値に基づいて複数のQRコードをまとめて簡単に作成できます

正直なところ、上記の方法には独自の制限があるため、扱いが簡単ではありません。 ここで強くお勧めします QRコードを挿入 の特徴 Kutools for Excel。 この機能を使用すると、Excelで指定したセル値に基づいて、数回クリックするだけでQRコードをまとめてすばやく挿入できます。 それを成し遂げるために次のようにしてください。

申請する前に Kutools for Excelについては 最初にダウンロードしてインストールします.

1.まず、QRコードを作成する値を準備します。

2。 クリック クツール > インセット > QRコードを挿入.

ヒント: このパスで機​​能が見つからない場合は、を押してください 他の + S キーを同時に開いて Kutools関数の検索 ボックス、手動で入力 QRコード 検索ボックスで、あなたは見ることができます QRコードを挿入 機能が一覧表示されます。クリックするだけで機能がアクティブになります。 スクリーンショットを参照してください:

これで、ワークブックの右側に[QRコードの挿入]ペインが表示されます。

3。 の中に QRコードを挿入 ペインでは、次のように構成する必要があります。

3.1) データ範囲 ボックスで、QRコードを作成する値を含むセルの範囲を選択します。
3.2) 挿入範囲 ボックスで、QRコードを出力する空白セルの範囲を選択します。
3.3) オプション セクション、設定 サイズ、線の色、背景色 & エラー訂正レベル 必要に応じてQRコード用。
注: QRコードのサイズは500ピクセルを超えることはできません。
3.4)をクリックします 生成する ボタン。 スクリーンショットを参照してください:

4.次に、 Kutools for Excel ダイアログボックスが表示されたら、をクリックします [OK]をクリックします。

5.次に、QRコードが同時に作成されます。 手動で閉じる必要があります QRコードを挿入 すべてのQRコードの作成が終了したらペイン。

クリックして この機能についてもっと知る...


関連記事:

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、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