Note: The other languages of the website are Google-translated. Back to English

Bagaimana cara menyalin data ke lembar kerja lain dengan Filter Tingkat Lanjut di Excel?

Biasanya, kami dapat dengan cepat menerapkan Filter Lanjutan fitur untuk mengekstrak data dari data mentah di lembar kerja yang sama. Namun, terkadang, saat Anda mencoba menyalin hasil yang difilter ke lembar kerja lain, Anda akan mendapatkan pesan peringatan berikut. Dalam kasus ini, bagaimana Anda bisa menangani tugas ini di Excel?

Salin data ke lembar kerja lain dengan Filter Tingkat Lanjut menggunakan fitur Filter Tingkat Lanjut

Salin data ke lembar kerja lain dengan Filter Tingkat Lanjut dengan menggunakan kode VBA


Salin data ke lembar kerja lain dengan Filter Tingkat Lanjut menggunakan fitur Filter Tingkat Lanjut

Berikut ini solusi sederhana bagi Anda untuk menyelesaikan pekerjaan ini, lakukan seperti ini:

1. Aktifkan lembar kerja tempat Anda ingin menyalin hasil yang difilter dengan menggunakan fungsi Filter Tingkat Lanjut.

2. Lalu klik Data > Advanced, lihat tangkapan layar:

3. di Filter Lanjutan kotak dialog, pilih Salin ke lokasi lain dari Tindakan bagian, lalu klik tombol untuk memilih rentang data yang ingin Anda filter di lembar lain di samping Rentang daftar, lanjutkan mengklik tombol di samping Rentang kriteria untuk memilih kriteria dari lembar lain, lihat tangkapan layar:

4. Lalu klik tombol di samping Salin ke kotak untuk memilih sel tempat Anda ingin menampilkan hasil yang difilter dari lembar aktif, lalu klik OK tombol, hasil yang difilter telah diekstraksi ke lembar lain berdasarkan lembar data asli Anda.


Salin data ke lembar kerja lain dengan Filter Tingkat Lanjut dengan menggunakan kode VBA

Jika Anda ahli dengan kode VBA, Anda dapat menyelesaikan pekerjaan ini dengan mengikuti kode VBA.

1. Aktifkan lembar kerja yang ingin Anda filter dan salin hasilnya ke lembar lain.

2. Tahan ALT + F11 kunci di Excel, dan itu membuka file Microsoft Visual Basic untuk Aplikasi jendela.

3. Klik Menyisipkan > Modul, dan tempel kode berikut di Modul Jendela.

Kode VBA: Salin data ke lembar kerja lain dengan Filter Tingkat Lanjut:

Sub Advancedfiltertoanothersheet()
'Updateby Extendoffice
    Dim xStr As String
    Dim xAddress As String
    Dim xRg As Range
    Dim xCRg As Range
    Dim xSRg As Range
    On Error Resume Next
    xAddress = ActiveWindow.RangeSelection.Address
    Set xRg = Application.InputBox("Please select the filter range:", "Kutools for Excel", xAddress, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    Set xCRg = Application.InputBox("Please select the criteria range:", "Kutools for Excel", "", , , , , 8)
    If xCRg Is Nothing Then Exit Sub
    Set xSRg = Application.InputBox("Please select the output range:", "Kutools for Excel", "", , , , , 8)
    If xSRg Is Nothing Then Exit Sub
    xRg.AdvancedFilter xlFilterCopy, xCRg, xSRg, False
    xSRg.Worksheet.Activate
    xSRg.Worksheet.Columns.AutoFit
End Sub

4. And then press F5 key to run this code, and a prompt box is popped out to let you select the data range that you want to filter, see screenshot:

5. Then click OK, and another dialog box is popped out to remind you to select the criteria range you want to filter based on, see screenshot:

6. Go on clicking OK, in the popped out dialog box, please select a cell from another new worksheet where you want to output the filter result, see screenshot:

7. At last, click OK button, the filtered data has been outputted into another specified sheet as you need.


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office / Excel 2007-2021 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (1)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
No funciona, sigue el mismo mensaje de error....
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL