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

Excelで値のみを貼り付ける(フォーマットを防ぐ)ように制限するにはどうすればよいですか?

通常、コピーしたデータはCtrl + Vキーを同時に押すだけで貼り付けます。 そして、それはすべてのセルフォーマットと一緒にコピーされた値を貼り付けます。 値のみを貼り付けてセルの書式を制限する必要がある場合は、次の方法が役立ちます。

値の貼り付け機能を使用して、値の貼り付けのみに制限(フォーマットを防止)
VBAコードで値のみを貼り付ける(フォーマットを防ぐ)ように制限する
Kutools forExcelでのみ値を貼り付けるように制限する


値の貼り付け機能を使用して、値の貼り付けのみに制限(フォーマットを防止)

値の貼り付けのみに制限する簡単な方法は、コピーしたデータをExcelでのみ値として貼り付けることです。

1.データをコピーした後、データを貼り付ける宛先セルを右クリックします。

2.次に、 価値観 ボタンの下に 貼り付けオプション 右クリックメニューのセクション。 スクリーンショットを参照してください:

コピーされたセルの値のみが宛先セルに貼り付けられていることがわかります。


VBAコードで値のみを貼り付ける(フォーマットを防ぐ)ように制限する

次のVBAコードは、コピーされたセルの値のみを貼り付け、すべてのセルの書式を制限するのに役立ちます。 次のようにしてください。

1。 押す 他の + F11 キーを同時に開いて アプリケーション向け Microsoft Visual Basic 窓。

2。 の中に アプリケーション向け Microsoft Visual Basic ウィンドウで、ダブルクリックします このワークブック セクションに プロジェクト 右ペインを開いて このワークブック コードウィンドウ。 次に、以下のVBAコードをコピーしてウィンドウに貼り付けます。

VBAコード:Excelでのみ値を貼り付けるように制限する

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    On Error Resume Next
    Target.PasteSpecial xlPasteValues
    Application.CutCopyMode = True
End Sub

3。 プレス 他の + Q キーを同時に押して、Microsoft Visual Basic forApplicationsウィンドウを閉じます。

次に、データをコピーして、宛先のワークシートに移動します。 コピー先のセルをXNUMX回クリックまたは右クリックするだけで、コピーされたセルの値がすぐにフォーマットされずに貼り付けられます。


Kutools forExcelでのみ値を貼り付けるように制限する

Kutools for Excel 's コピー範囲 ユーティリティを使用すると、Excelで選択した範囲または複数の選択した範囲の値のみを簡単に貼り付けることができます。 次のようにしてください。

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

1.を押しながら、XNUMXつまたは複数の範囲を選択します。 Ctrlキー キーを押してからクリック クツール > コピー範囲

2。 の中に 複数の範囲をコピーする ダイアログボックスで、 価値観 内のオプション 特別なペースト セクションをクリックし、 OK

Note:両方または一方を確認できます 行の高さを含む列幅を含む 必要に応じてオプション。

3.次は 複数の範囲をコピーする ダイアログボックスで、コピーしたセルを貼り付けるための空白のセルを選択し、[ OK

次に、XNUMXつの範囲または複数の範囲で選択されたすべてのセルの値のみが貼り付けられます。

  このユーティリティの無料トライアル(30日)が必要な場合は、 クリックしてダウンロードしてください、次に、上記の手順に従って操作を適用します。


関連記事:

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

🤖 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 (14)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello, there are a problem here, values are automatically paste when you click on the cell
This comment was minimized by the moderator on the site
Hi, any chance to add this feature only in some sheets?
This comment was minimized by the moderator on the site
Hallo,
ich habe eine Excel-Datei (100 Tabellenregister) für die ich eine Formel gesucht habe, die es erlaubt, beim Kopieren nur Werte einfügen, möglich zu machen.

Ausschneiden+Drag&Drop habe ich bereits per Makro ausgeschaltet. Ich habe jetzt im Netz folgenden Code gefunden, den ich in
"Diese Arbeitsmappe" geschrieben habe:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End Sub

(Der Code verursacht, dass ich nach kopieren, den Inhalt sofort als Wert in eine angeklickte Zelle kopiert bekomme)
Das funktioniert sehr gut, jedoch habe ich noch ein Problem dabei:

Wenn ich Werte aus einer Zelle kopiere, kann ich diese auch in geschützte
Zellen kopieren und das soll nicht sein. In vielen geschützten Zellen stehen Formeln die nicht überschrieben werden sollen.

Kann mir jemand helfen, wie ich den Code erweitern oder ändern kann, dass er es nur erlaubt in nicht geschützte Zellen zu kopieren?

Gruß Heiko
This comment was minimized by the moderator on the site
Hi! for Kutools 'Copy Ranges', I realized there is limit on number of columns that can be copy at a time. I am working with 7,500 columns. I select 7,500 columns as the range, but it can only copy and paste partial of what I had selected, not all. I am planning to copy all these columns in one go and paste. Is there any way I can do that ? just to speed things up. Any help would highly be appreciated. Thanks!
This comment was minimized by the moderator on the site
Hi, is there code for working with ctrl+v. This code paste automatically when selecting cell. I found module code below link but couldn't find code for workbook like this.
https://www.extendoffice.com/documents/excel/2545-excel-set-paste-values-as-default.html
This comment was minimized by the moderator on the site
It's sad no one answers. I need this information too.
This comment was minimized by the moderator on the site
This code was great, but it was pasting items in the system clipboard that were copied from other programs. I put it in an 'If' statement which does nothing, unless Excel cells are actually in Cut or Copy mode. i.e. moving border around the cell(s).

Application.CutCopyMode has three modes: False = Not in Cut or Copy mode. | xlCopy = In Copy mode. | xlCut = In Cut mode.

'If in Cut or Copy mode, Paste Values Only
'If Not in Cut or Copy mode, skip and do nothing.

On Error Resume Next
If Not Application.CutCopyMode = False Then
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End If

This was a bit of a bugger for me to figure out. Hope it helps someone else.
-Travis (IT Professional since 1996)
This comment was minimized by the moderator on the site
This addition was a great help! Thank you so much for posting!
This comment was minimized by the moderator on the site
Hi Travis, Thank you very much for posting this.
I never respond to posts but i appreciate you posting this answer.
This comment was minimized by the moderator on the site
Hi Travis, is there code for working with ctrl+v. This code paste automatically when selecting cell. I found module code below link but couldn't find code for workbook like this. I hope what I have requested is possible.
https://www.extendoffice.com/documents/excel/2545-excel-set-paste-values-as-default.html
This comment was minimized by the moderator on the site
Dean, it is very useful! Thanks!
This comment was minimized by the moderator on the site
Thank you so much!! It works well and its so useful for the project that I am working on.
This comment was minimized by the moderator on the site
This works for me:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End Sub
This comment was minimized by the moderator on the site
Would this work on Worksheet level only? I am trying to restrict this only on one worksheet (not entire workbook), but it seems there is a problem.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations