跳到主要內容

如何將數據粘貼到篩選列表中,僅跳過Excel中的隱藏行?

眾所周知,當我們嘗試將值粘貼到過濾的表列表中時,隱藏的行不會被跳過,因此我們將得到錯誤的結果。 例如,我有兩個工作表,工作表1包含已過濾掉的數據,工作表2包含我要粘貼到過濾後的工作表1的數據,如下面的屏幕截圖所示。 有什麼功能可以讓我們僅在Excel中將數據粘貼到過濾的行中?

doc粘貼到過濾數據1 doc粘貼到過濾數據2

使用助手列將數據粘貼到Excel中的過濾列表中

使用Kutools for Excel將數據粘貼到Excel中的過濾列表中


箭頭藍色右氣泡 使用助手列將數據粘貼到Excel中的過濾列表中

要將數據粘貼到過濾列表中,您需要應用一些幫助器列,請按以下步驟操作:

1。 首先,點擊 數據 > 篩選 要刪除過濾器,並在過濾器列旁邊的單元格C1和C2中分別輸入2、3,然後選擇單元格C2和C3,然後將填充手柄拖到工作表1中與您的數據相對應的單元格中。請參見屏幕截圖:

doc粘貼到過濾數據3

2. 然後通過單擊再次過濾數據 數據 > 篩選,在此示例中,我將過濾工作表1中的“ KTE”,然後鍵入此公式 = ROW() 到單元格D2中,然後將此公式填充到D列所需的可見單元格中,請參見屏幕截圖:

doc粘貼到過濾數據4 2 doc粘貼到過濾數據5

3。 然後再次取消過濾器,並按D列以升序對數據進行排序,所有KTE項均已排序在一起,請參見屏幕截圖:

doc粘貼到過濾數據4

4。 接下來,您可以在工作表1中復制數據A6:B2並將其粘貼到工作表2的範圍A7:B1中。

doc粘貼到過濾數據4

5。 然後,您需要恢復原始數據順序,請單擊C列並對數據進行升序排序,請參見屏幕截圖:

doc粘貼到過濾數據4

6。 並且數據順序已恢復,然後可以根據需要刪除C列和D列的內容,最後可以過濾所需的數據,並且可以看到過濾的數據已成功被新數據替換。

doc粘貼到過濾數據4


箭頭藍色右氣泡 使用Kutools for Excel將數據粘貼到Excel中的過濾列表中

第一種方法應用起來太複雜,因此,在這裡,我將向您介紹一個方便的工具- Excel的Kutools,其 粘貼到可見範圍 功能,您可以快速將數據粘貼到過濾列表中,而無需付出太多努力。

Excel的Kutools : 帶有300多個便捷的Excel加載項,可以在30天內免費試用.

安裝後 Excel的Kutools,請執行以下操作:

1。 首先,選擇要復制並粘貼到過濾列表的數據排列。 然後點擊 庫工具 > 範圍 > 粘貼到可見範圍,請參見屏幕截圖:

doc粘貼到過濾數據4

2。 然後一個 粘貼到可見範圍 彈出提示框,單擊要粘貼新數據的單元格或範圍單元格,請參見屏幕截圖:

doc粘貼到過濾數據4

3。 然後點擊 OK 按鈕,新數據僅粘貼到過濾列表中,隱藏行數據也將保留。

(1.)如果選擇 僅粘貼值 選項,僅將值粘貼到過濾的數據中,請參見screesnhot:

doc粘貼到過濾數據4

(2.)如果選擇 全部 選項,值和格式將粘貼到過濾的數據中,請參見screesnhot:

doc粘貼到過濾數據4

單擊以了解有關此粘貼到可見範圍實用程序的更多信息。


箭頭藍色右氣泡 僅使用Kutools for Excel將單元格值複製和粘貼到可見或過濾的單元格中:

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (11)
Rated 5 out of 5 · 2 ratings
This comment was minimized by the moderator on the site
It works, thank you. The first method is quiet simple for me even for the table with thousands of rows.
Rated 5 out of 5
This comment was minimized by the moderator on the site
Qué gran solución. Lo máximo!
This comment was minimized by the moderator on the site
Hallo zusammen, ich habe die Version mit den Hilfsspalten soeben ausprobiert und mit ein paar kleinen Änderungen, funktioniert es auch in M365: = REIHE () gibt es nicht mehr, das heißt jetzt: =ZEILE()
Nachdem ich diese Formel eingefügt habe, habe ich (in meiner gefilterten Liste) die Werte, die bei =ZEILE() angezeigt werden farbig markiert. Erst anschließend habe ich wieder den Filter entfernt und die Liste nach der ausgewählten Farbe sortiert. Fertig! So kann man die obersten (farbigen) Zellen nun bearbeiten und Daten einfügen.
This comment was minimized by the moderator on the site
Muchas gracias, me sirvió mucho. Toda una tarde estaba viendo manera, pero con Kutools for Excel la vida es mas facil
Rated 5 out of 5
This comment was minimized by the moderator on the site
Hello, Saul,
Glad the Kutools can help you, 😀
This comment was minimized by the moderator on the site
Not working. I tried in Office 2007. I copied range of cell and try to paste into visible cells, the clipboard data deleted but its not pasting. Try to provide solution
This comment was minimized by the moderator on the site
A mon niveau c'est pareil, ça ne fonctionne pas. Existe-t-il autre solution ?
This comment was minimized by the moderator on the site
Hello, friends
If the above method can not work well, here, you can also use the below VBA code: (Note: Before using the code, you should backup your data, the code doesn't support undo.)
Sub CopyFilteredCells()
	'Updateby Extendoffice
	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


Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
I spent hours trying to solve this until I eventually found this awesome website. Thanks!
This comment was minimized by the moderator on the site
Very helpful and straightforward. I was looking everywhere on the internet and did not find anything. Or tutorials to achieve something else :) Thanks a lot
This comment was minimized by the moderator on the site
YOU. ARE. BAE. AND. THE. GOAT. But seriously thanks so much! I have been looking everywhere for help on this!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations