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

 外部コンテンツをExcelに貼り付ける方法は、常に宛先の書式と一致しますか?

他の外部アプリケーションからワークシートにデータをコピーして貼り付けると、Excelはデフォルトで使用されていた元の形式でデータを貼り付けます。 使用したワークシートの独自の形式を使用して貼り付けたデータが必要な場合は、貼り付けるときに必要に応じて[宛先の書式設定に一致]オプションを選択する必要があります。 ただし、このオプションを頻繁に適用する必要がある場合は、Ctrl + Vを使用してデータを貼り付けるときにこのオプションをデフォルトとして設定するのに役立ちます。

外部コンテンツをワークシートに貼り付けると、Excelオプションを使用して宛先の書式が常に一致します

外部コンテンツをワークシートに貼り付けると、宛先の書式が常にVBAコードと一致します


外部コンテンツをワークシートに貼り付けると、Excelオプションを使用して宛先の書式が常に一致します

Excelに宛先フォーマットでデータを貼り付けるには、特別なコマンドを クイックアクセスツールバー.

1に設定します。 OK をクリックします。 File > オプション、そして Excelのオプション ダイアログボックス:

  • (1.)クリック クイックアクセスツールバー 左側のペイン。
  • (2.)次に選択します すべてのコマンドからのコマンドを選択 ドロップダウンリスト;
  • (3.)次に、下にスクロールして選択します 宛先フォーマットの貼り付けと一致 リストボックス内;
  • (4.)次にクリックします 追加>> このコマンドをに追加するボタン クイックアクセスツールバーをカスタマイズする.

doc-match-destination-formatting-1

2. このコマンドを追加したら、をクリックします OK ボタンをクリックして、このダイアログボックスを閉じます。

3。 そして今、 宛先フォーマットの貼り付けと一致 が追加されました クイックアクセスツールバーをカスタマイズする、スクリーンショットを参照してください:

doc-match-destination-formatting-2

そして、他のアプリケーションからデータを貼り付けるときは、クリックするだけです。 宛先フォーマットの貼り付けと一致 ボタンの クイックアクセスツールバー、コンテンツはワークシートの宛先フォーマットに一致するシートに貼り付けられます。

注: この方法はExcel2007には適用されません。


外部コンテンツをワークシートに貼り付けると、宛先の書式が常にVBAコードと一致します

次のVBAコードでCtrl + Vを使用する場合、デフォルトの貼り付けオプションとして[宛先の書式設定の一致]を設定することもできます。

1。 を押し続けます Alt + F11 キー、そしてそれは開きます Microsoft Visual Basic forApplicationsウィンドウ.

2に設定します。 OK をクリックします。 インセット > モジュール、次のコードをに貼り付けます モジュールウィンドウ.

VBAコード:デフォルトの貼り付けとして[一致先の書式設定]を設定します

Sub PasteWithDestinationFormatting()
ActiveCell.PasteSpecial (xlPasteValues)
End Sub

3。 次に、このダイアログを保存して閉じ、を押します Altキー+ F8 キーを押して マクロ ダイアログ。 の中に マクロ ダイアログで、手順2で作成したコード名を選択し、[ オプション ボタン、そして登場 マクロオプション ダイアログ、入力 vショートカットキー セクション、スクリーンショットを参照してください:

doc-match-destination-formatting-3

4. 次に、をクリックします。 OK セクションに マクロオプション ダイアログを開き、 マクロ ダイアログボックス。

そして今、外部アプリケーションからワークシートにデータを貼り付けると Ctrlキー+ V、データは次のように貼り付けられます マッチ先の書式設定 デフォルトでは


関連記事:

ExcelでCtrl + Vを使用するときに、貼り付け値をデフォルトの貼り付けとして設定するにはどうすればよいですか?


デモ:外部コンテンツをExcelに貼り付けると、常に宛先の書式に一致します

Kutools for Excel:300以上の便利なExcelアドインがあり、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
On "Paste external content to worksheet always match destination formatting with VBA code". After "4. Then click OK in the Macro Options dialog, and close the Macro dialog box". The code would take effect only after saving/closing your worksheet.
This comment was minimized by the moderator on the site
Tried the close and save method. Still running into the same issue that Suneet was.
This comment was minimized by the moderator on the site
Hey, the macro for paste is not working. When I hit CTRL+v, it says: Run-time error '1004': PasteSpecial method of Range class failed
This comment was minimized by the moderator on the site
I'm getting this same error
This comment was minimized by the moderator on the site
Hello, guys,
If you want to paste the contents from website, you should apply the following VBA code.

Sub PasteWithDestinationFormatting()
Dim xRg As Range
Set xRg = Application.InputBox("Please select a cell to paste: ", "Kutools for Excel", , , , , , 8)
If xRg Is Nothing Then Exit Sub
xRg.Range("A1").Activate
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, DisplayAsIcon:=False
End Sub

After pasting this code into the code module, and then go to the Macro dialog box to set the shortcut.
From now, when pasting contents from other applications, such as Word, website, a prompt box will pop out to remind you select a cell to put the pasting contents, and the contents will be pasted as Match Destination Formatting by default.

Hope it can help you! Thank you!
This comment was minimized by the moderator on the site
What a dick
This comment was minimized by the moderator on the site
That worked, but now I have to double click, or else the Kutools message comes up. Any solution?
This comment was minimized by the moderator on the site
Works for me, just in case somebody needs it.

Sub PasteWithDestinationFormatting()
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, DisplayAsIcon:=False
End Sub
This comment was minimized by the moderator on the site
it works thanks
This comment was minimized by the moderator on the site
The problem I see after enabling this macro, that works nicely btw,is that my Undo button is greyed out and CTRL+z doesn't work anymore...
This comment was minimized by the moderator on the site
Same, I also cannot use CTRL+Z or and the Undo button is grayed out after using control +Z. But CTRL +V works now to allow me to copy and paste from Google Docs to Excel and have it match the destination format, saving me hundreds of clicks. Thanks!
This comment was minimized by the moderator on the site
i dont know how to thank you for this. its finally solved THANKYOU SOMUCH
This comment was minimized by the moderator on the site
OH MY GOODNESS !!!! YOU LITERALLY ARE A LIFE SAVER!
This comment was minimized by the moderator on the site
This worked for me. Thanks. You just saved me a few hundred clicks a day.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations