Loncat ke daftar isi utama

Bagaimana cara menempelkan nilai ke sel yang terlihat / difilter hanya di Excel?

Di Excel, jika Anda telah memfilter data atau menyembunyikan beberapa sel, dan saat Anda menempelkan nilai ke dalam rentang yang difilter atau disembunyikan, sel yang tersembunyi juga akan diisi dengan nilai yang ditempelkan. Di sini saya akan memberi tahu Anda beberapa trik untuk menempelkan nilai ke sel yang terlihat hanya di Excel.

Tempelkan nilai ke sel yang terlihat dengan VBA

Tempelkan nilai ke sel yang terlihat dengan Tempel ke Rentang Terlihat Kutools for Excel ide bagus3


Tempelkan nilai ke sel yang terlihat dengan VBA

Di Excel, tidak ada cara lain untuk mengatasi masalah ini kecuali VBA.

1. tekan Alt + F11 kunci secara bersamaan, dan a Microsoft Visual Basic untuk Aplikasi jendela muncul.

2. klik Menyisipkan > Modul, lalu tempel kode VBA di bawah ini ke jendela Modul yang muncul.

VBA: Tempelkan nilai ke sel yang terlihat saja.

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. klik F5 kunci atau Run tombol, lalu dialog muncul untuk Anda memilih nilai untuk disalin. Lihat tangkapan layar:
doc-paste-ke-sel-terlihat-1

4. Setelah memilih nilai, klik OK, lalu dialog lain muncul untuk memilih rentang untuk menempelkan data yang dipilih. Lihat tangkapan layar:
doc-paste-ke-sel-terlihat-2

5. klik OK. Anda hanya dapat melihat sel yang terlihat disisipkan nilai yang dipilih.


Tempelkan nilai ke sel yang terlihat dengan Tempel ke Rentang Terlihat Kutools for Excel

Sebenarnya, jika Anda menggunakan Tempel ke Rentang Terlihat kegunaan Kutools untuk Excel - Alat Excel yang praktis, Anda dapat dengan cepat dan mudah memecahkan masalah menempelkan nilai ke rentang yang terlihat.
doc paste sel yang terlihat 6

Kutools untuk Excel, dengan lebih dari 300 fungsi praktis, membuat pekerjaan Anda lebih mudah. 

Setelah menginstal Kutools for Excel, lakukan seperti di bawah ini:锛圲nduh Gratis Kutools untuk Excel Sekarang!)

1. Pilih rentang nilai yang ingin Anda salin dan tempel, lalu klik Kutools > Jarak > Tempel ke Rentang Terlihat > Semua or Hanya Tempel Nilai. Lihat tangkapan layar:
doc paste sel yang terlihat 7

2. Kemudian a Tempel ke Rentang Terlihat dialog muncul, dan pilih rentang yang ingin Anda tempelkan nilainya. Lihat tangkapan layar:
doc paste sel yang terlihat 8

3. klik OK. Sekarang nilai yang dipilih ditempelkan ke kisaran yang terlihat saja.

Tempelkan hanya nilai ke sel yang terlihat Tempel semua ke sel yang terlihat
doc paste sel yang terlihat 9 doc paste sel yang terlihat 10


Catatan:
Utilitas ini berfungsi pada baris atau kolom yang tersembunyi dan difilter

Klik di sini untuk informasi lebih detail tentang utilitas Tempel ke Rentang Terlihat.

  Tempel ke Sel yang Terlihat Saja

Alat Produktivitas Kantor Terbaik

馃 Kutools AI Ajudan: Merevolusi analisis data berdasarkan: Eksekusi Cerdas   |  Hasilkan Kode  |  Buat Rumus Khusus  |  Analisis Data dan Hasilkan Grafik  |  Aktifkan Fungsi Kutools...
Fitur Populer: Temukan, Sorot, atau Identifikasi Duplikat   |  Hapus Baris Kosong   |  Gabungkan Kolom atau Sel tanpa Kehilangan Data   |   Putaran tanpa Formula ...
Pencarian Super: VLookup Beberapa Kriteria    VLookup Nilai Berganda  |   VLookup di Beberapa Lembar   |   Pencarian Fuzzy ....
Daftar Drop-down Lanjutan: Buat Daftar Drop Down dengan Cepat   |  Daftar Drop Down yang Bergantung   |  Multi-pilih Drop Down List ....
Manajer Kolom: Tambahkan Jumlah Kolom Tertentu  |  Pindahkan Kolom  |  Alihkan Status Visibilitas Kolom Tersembunyi  |  Bandingkan Rentang & Kolom ...
Fitur Unggulan: Fokus Kisi   |  Tampilan Desain   |   Bar Formula Besar    Manajer Buku Kerja & Lembar   |  Perpustakaan Sumberdaya (Teks otomatis)   |  Pemetik tanggal   |  Gabungkan Lembar Kerja   |  Enkripsi/Dekripsi Sel    Kirim Email berdasarkan Daftar   |  Filter Super   |   Filter Khusus (filter tebal/miring/coret...) ...
15 Perangkat Teratas12 Teks Tools (Tambahkan Teks, Hapus Karakter, ...)   |   50 + Grafik jenis (Gantt Chart, ...)   |   40+ Praktis Rumus (Hitung usia berdasarkan ulang tahun, ...)   |   19 Insersi Tools (Masukkan Kode QR, Sisipkan Gambar dari Jalur, ...)   |   12 Konversi Tools (Angka ke Kata, Konversi Mata Uang, ...)   |   7 Gabungkan & Pisahkan Tools (Lanjutan Gabungkan Baris, Pisahkan Sel, ...)   |   ... dan banyak lagi

Tingkatkan Keterampilan Excel Anda dengan Kutools for Excel, dan Rasakan Efisiensi yang Belum Pernah Ada Sebelumnya. Kutools for Excel Menawarkan Lebih dari 300 Fitur Lanjutan untuk Meningkatkan Produktivitas dan Menghemat Waktu.  Klik Di Sini untuk Mendapatkan Fitur yang Paling Anda Butuhkan...

Deskripsi Produk


Tab Office Membawa antarmuka Tab ke Office, dan Membuat Pekerjaan Anda Jauh Lebih Mudah

  • Aktifkan pengeditan dan pembacaan tab di Word, Excel, PowerPoint, Publisher, Access, Visio, dan Project.
  • Buka dan buat banyak dokumen di tab baru di jendela yang sama, bukan di jendela baru.
  • Meningkatkan produktivitas Anda sebesar 50%, dan mengurangi ratusan klik mouse untuk Anda setiap hari!
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