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

Excelでのみ表示/フィルタリングされたセルに値を貼り付ける方法は?

Excelで、データをフィルター処理したり、一部のセルを非表示にしたりして、フィルター処理または非表示の範囲に値を貼り付けると、非表示のセルにも貼り付けられた値が入力されます。 ここでは、Excelでのみ表示されているセルに値を貼り付けるためのいくつかの秘訣を説明します。

VBAを使用して表示セルに値を貼り付けます

Excel用のKutoolsの可視範囲に貼り付けを使用して可視セルに値を貼り付けます 良いアイデア3


VBAを使用して表示セルに値を貼り付けます

Excelでは、VBA以外にこの問題を解決する方法はありません。

1。 押す Altキー+ F11 同時にキー、および アプリケーション向け Microsoft Visual Basic ウィンドウがポップします。

2。 クリック インセット > モジュール、次にVBAコードの下をポップするモジュールウィンドウに貼り付けます。

VBA:表示されているセルにのみ値を貼り付けます。

Sub CopyFilteredCells()
	'Updateby20150203
	Dim rng1 As Range
	Dim rng2 As Range
	Dim InputRng As Range
	Dim OutRng As Range
	xTitleId     = "KutoolsforExcel"
	Set InputRng = Application.Selection
	Set InputRng = Application.InputBox("Copy Range :", xTitleId, InputRng.Address, Type: = 8)
	Set OutRng   = Application.InputBox("Paste Range:", xTitleId, Type: = 8)
	For Each rng1 In InputRng
		rng1.Copy
		For Each rng2 In OutRng
			If rng2.EntireRow.RowHeight > 0 Then
				rng2.PasteSpecial
				Set OutRng = rng2.Offset(1).Resize(OutRng.Rows.Count)
				Exit For
			End If
		Next
	Next
	Application.CutCopyMode = False
End Sub

3。 クリック F5 キーまたは ラン ボタンをクリックすると、コピーする値を選択するためのダイアログが表示されます。 スクリーンショットを参照してください:
doc-paste-to-visible-cell-1

4.値を選択したら、をクリックします OK、次に別のダイアログが表示され、選択したデータを貼り付ける範囲を選択します。 スクリーンショットを参照してください:
doc-paste-to-visible-cell-2

5。 クリック OK。 表示されているセルのみが選択した値を貼り付けていることがわかります。


Excel用のKutoolsの可視範囲に貼り付けを使用して可視セルに値を貼り付けます

実は 可視範囲に貼り付けます の有用性 Kutools for Excel –便利なExcelツールで、値を可視範囲に貼り付ける問題をすばやく簡単に解決できます。
ドキュメント貼り付け表示セル6

Kutools for Excel, 以上で 300 便利な機能は、あなたの仕事をより簡単にします。 

インストールした後 Kutools for Excel、以下のようにしてください:(今すぐExcel用のKutoolsを無料でダウンロードしてください!)

1.コピーして貼り付ける値の範囲を選択し、[ クツール > レンジ > 可視範囲に貼り付けます > すべて or 値の貼り付けのみ。 スクリーンショットを参照してください:
ドキュメント貼り付け表示セル7

2.次に、 可視範囲に貼り付けます ダイアログが表示され、値を貼り付ける範囲を選択します。 スクリーンショットを参照してください:
ドキュメント貼り付け表示セル8

3。 クリック OK。 これで、選択した値が表示範囲にのみ貼り付けられます。

表示されているセルに値のみを貼り付ける 表示されているセルにすべて貼り付けます
ドキュメント貼り付け表示セル9 ドキュメント貼り付け表示セル10


注:
このユーティリティは、非表示の行または列の両方で機能します

Paste to Visible Rangeユーティリティの詳細については、ここをクリックしてください。

  可視セルのみに貼り付け

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

🤖 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 (22)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you very much hundred times
This comment was minimized by the moderator on the site
After going absolutely crazy trying to find a solution, this worked - specifically, the macro for pasting INTO visible only cells. Note that I was copying only from unfiltered cells. However, the people complaining that it doesn't do both (which I'm not sure is true) should be quiet because it's pretty easy to copy FROM only visible/filtered cells into an unfiltered area. You don't need a macro for that (and if you're trying to do both, just do the copying of filtered cells in Excel first, then use this macro). Again, what Excel is fully unable to do on its own without a macro is to paste to visible cells only. This macro saved my bum. Thanks!
This comment was minimized by the moderator on the site
Thanks for your recognition.
This comment was minimized by the moderator on the site
This worked perfectly, thanks!
This comment was minimized by the moderator on the site
You can also easily do this without a plugin....
CTRL+C the cells you want to paste
Highlight the filtered/partially hidden range you're pasting to
CTRL+G
Select "Special"
Select "Visible Cells Only" & hit OK
CTRL+V
This comment was minimized by the moderator on the site
Thansk for you reply, but it does not work. With your method, it paste all cells including hidden ones with the copied values.
This comment was minimized by the moderator on the site
VBA method did not work! It copied the invisible cells into the visible cells. Now, I realize that the title doesn't say "How to paste values FROM VISIBLE/FILTERED CELLS to visible/filtered cells only in Excel?" but if my workbook is filtered, it's highly possible that this is what is needed. If this is what you want - copy from one section to another (or to simply paste values from certain cells right back to the same cells, so to remove the fomulas) you first need to copy/paste values to an unfiltered workbook/worksheet. THEN you can use the macro...or at least I hope you can. I didn't save my data and UNDO does not work....
This comment was minimized by the moderator on the site
I am sorry for that.
This comment was minimized by the moderator on the site
So is there any update version for this situation?
This comment was minimized by the moderator on the site
It is even more flexible and functional if the inner loop is constructed with Do While loop.
This comment was minimized by the moderator on the site
This was very helpful. Many thanks.
This comment was minimized by the moderator on the site
i am currently developing a macro. In that i need to do filter for a particular column for Eg: Column D and need to paste some values Eg: Valid in column B. only i need to paste the value for the filtered cells. And also i want to know the coding for multiple filters at a time. EG: filtering in one column and checking the value and again do filter in another column without making false for the previous filter. help me on this.
This comment was minimized by the moderator on the site
This works great up to record 1163 of 23,000 and then it stops. Why would it stop?
This comment was minimized by the moderator on the site
You rock! I've had this issue multiple times in the past but it became a back-breaker for the recent project. And you've helped me to fix it beautifully. THANK YOU!
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