Loncat ke daftar isi utama

Bagaimana cara menggabungkan atau menggabungkan lembar kerja atau buku kerja menjadi satu lembar kerja?

Dalam pekerjaan sehari-hari, kami mungkin mengalami masalah yang menggabungkan ratusan lembar atau buku kerja menjadi satu lembar untuk menganalisis data yang membutuhkan banyak waktu jika Anda menggunakan perintah Salin dan Tempel di Excel. Di sini, di tutorial ini, saya akan memberikan beberapa tip untuk menyelesaikan pekerjaan ini dengan cepat.

doc menggabungkan 1

NAVIGASI CEPAT

Menggabungkan semua lembar workbook aktif menjadi satu lembar dengan VBA
Menggabungkan puluhan lembar atau workbook menjadi satu worksheet / workbook dengan klik
Menggabungkan dua tabel menjadi satu dan memperbarui dengan kolom dengan klik
Unduh file contoh


Menggabungkan semua lembar workbook aktif menjadi satu lembar dengan VBA

Di bagian ini, saya memberikan kode VBA yang akan membuat lembar baru untuk mengumpulkan semua lembar buku kerja yang aktif saat Anda menjalankannya.

1. Aktifkan workbook yang ingin Anda gabungkan semua sheetnya, lalu tekan + kunci untuk membuka Microsoft Visual Basic untuk Aplikasi jendela.

2. Di jendela yang muncul, klik Menyisipkan > Modul untuk membuat skrip Modul baru.

3. Salin kode di bawah ini dan tempelkan ke skrip.

Sub Combine()
'UpdatebyExtendoffice
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub
doc menggabungkan 2

4. tekan F5 key, maka semua data di seluruh sheet telah digabungkan ke dalam sheet baru bernama Combined yang ditempatkan di depan semua sheet.


atau bergerak

Apakah Anda Ingin Mendapatkan Gaji dan Banyak Waktu Untuk Menemani Keluarga?

Tab Office Meningkatkan Efisiensi Anda Hingga 50% Di Microsoft Office Bekerja Sekarang

Luar biasa, mengerjakan dua atau lebih dokumen lebih mudah dan lebih cepat daripada mengerjakan satu dokumen.

Dibandingkan dengan browser terkenal, alat tab di Office Tab lebih kuat dan lebih efisien.

Kurangi ratusan klik mouse dan ketikan keyboard setiap hari untuk Anda, ucapkan selamat tinggal pada tangan mouse sekarang.

Jika Anda biasanya bekerja di banyak dokumen, Office Tab akan menjadi penghemat waktu yang tepat untuk Anda.

30percobaan gratis -hari, tidak perlu kartu kredit.

Baca SelengkapnyaDownload Gratis Sekarang


Menggabungkan puluhan lembar atau workbook menjadi satu worksheet / workbook dengan klik

Dengan VBA, Anda hanya bisa menggabungkan lembar di buku kerja aktif, tapi bagaimana Anda bisa menggabungkan lembar di seluruh buku kerja ke lembar atau buku kerja?

Gabungkan lembar di seluruh buku kerja menjadi satu lembar
doc menggabungkan 18

Gabungkan lembar di seluruh buku kerja menjadi satu buku kerja
doc menggabungkan 3

Untuk menyelesaikan pekerjaan ini dan memenuhi persyaratan lain pada kombinasi lembaran, Menggabungkan fungsi telah dikembangkan dengan empat skenario kombinasi:

  • Gabungkan beberapa lembar atau buku kerja menjadi satu lembar
  • Gabungkan beberapa lembar atau buku kerja menjadi satu buku kerja
  • Gabungkan lembar nama yang sama menjadi satu lembar
  • Gabungkan nilai di seluruh lembar atau buku kerja menjadi satu lembar

Di sini mengambil opsi kedua sebagai contoh:

Gabungkan beberapa lembar atau buku kerja menjadi satu buku kerja

Setelah pemasangan gratis Kutools for Excel, lakukan seperti di bawah ini:

1. Aktifkan Excel, klik Kutools Ditambah > Menggabungkan, sebuah dialog muncul untuk mengingatkan Anda bahwa buku kerja yang ingin Anda gabungkan harus ditutup. Klik OK untuk melanjutkan.
doc menggabungkan 4
doc menggabungkan 5

2. Dalam Gabungkan Lembar Kerja langkah 1 dialog, periksa Gabungkan beberapa lembar kerja dari buku kerja menjadi satu buku kerja pilihan. Klik Selanjutnya untuk melanjutkan ke langkah wisaya berikutnya.
doc menggabungkan 6

3. klik Add > File or Map untuk menambahkan buku kerja yang ingin Anda gabungkan ke Daftar buku kerja panel, lalu Anda dapat menentukan lembar kerja mana yang akan digabungkan dengan memeriksa nama di Daftar lembar kerja panel. Klik Selanjutnya untuk pergi ke langkah terakhir wizard.
doc menggabungkan 7

4. Pada langkah ini, tentukan pengaturan yang Anda butuhkan. Lalu klik Finish.
doc menggabungkan 8

5. Sebuah jendela muncul untuk Anda memilih folder untuk menempatkan buku kerja gabungan, lalu klik Save.
doc menggabungkan 9

Sekarang workbook telah digabungkan menjadi satu workbook. Dan di depan semua lembar, lembar master bernama Kutools for Excel juga dibuat yang mencantumkan beberapa informasi tentang lembar dan tautan untuk setiap lembar.
doc menggabungkan 10

Demo: Gabungkan lembaran / workbook menjadi satu sheet atau workbook

Kutools for Excel: 200 + alat praktis yang berguna, menyederhanakan tugas rumit di Excel menjadi beberapa klik.

Ucapkan Selamat Tinggal Pada Tangan Tikus dan Spondylosis Serviks Sekarang

300 alat canggih dari Kutools for Excel pecahkan 80% Tugas Excel dalam hitungan detik, menarik Anda keluar dari ribuan klik mouse.

Mudah menangani 1500 skenario kerja, tidak perlu membuang waktu untuk mencari solusi, punya banyak waktu untuk menikmati hidup Anda.

Tingkatkan produktivitas 80% untuk 110000+ orang yang sangat efektif setiap hari, tentu saja termasuk Anda.

Tidak lagi tersiksa oleh formula dan VBA yang menyakitkan, berikan otak Anda istirahat dan suasana kerja yang menyenangkan.

Uji coba gratis 30 hari dengan fitur lengkap, uang kembali 30 hari tanpa alasan.

Tubuh yang Lebih Baik Menciptakan Kehidupan yang Lebih Baik.


Menggabungkan dua tabel menjadi satu dan memperbarui dengan kolom dengan klik

Jika Anda ingin menggabungkan dua tabel menjadi satu dan memperbarui data berdasarkan kolom seperti gambar di bawah ini, Anda dapat mencoba Tabel Menggabungkan kegunaan Kutools untuk Excel.
doc menggabungkan 11

Kutools for Excel: lebih dari 200 add-in Excel yang berguna untuk menyederhanakan tugas rumit menjadi beberapa klik di Excel

Setelah pemasangan gratis Kutools for Excel, lakukan seperti di bawah ini:

1. klik Kutools Ditambah > Tabel Menggabungkan untuk mengaktifkan Tabel Menggabungkan wizard.
doc menggabungkan 12

2. Di langkah 1 panduan, Anda perlu memilih tabel utama dan rentang tabel pencarian secara terpisah. Lalu klik Selanjutnya.
doc menggabungkan 13

3. Centang kolom kunci yang ingin Anda perbarui datanya di tabel utama. Klik Selanjutnya.
doc menggabungkan 14

4. Kemudian centang kolom pada tabel utama yang ingin Anda perbarui datanya berdasarkan tabel lookup. Klik Selanjutnya.
doc menggabungkan 15

5. Di langkah 4 wizard, centang kolom yang ingin Anda tambahkan dari tabel pencarian ke tabel utama. Klik Selanjutnya.
doc menggabungkan 16

6. Pada langkah terakhir wizard, tentukan opsi pengaturan yang Anda butuhkan. Lalu klik Finish.
doc menggabungkan 17

Sekarang tabel utama telah mengupdate datanya dan menambahkan data baru berdasarkan tabel lookup.

Demo: Gabungkan lembaran / workbook menjadi satu sheet atau workbook

Kutools for Excel: 200 + alat praktis yang berguna, menyederhanakan tugas rumit di Excel menjadi beberapa klik.


Unduh File Contoh

mencicipi


Alat Produktivitas yang Direkomendasikan

Tab Office - Penjelajahan dengan Tab, Pengeditan, Pengelolaan Dokumen Di Microsoft Office 2019 - 2003 dan Office 365


tab kantor

Add-in Profesional untuk Mempercepat Excel 2019-2007, mengurangi jam tugas menjadi detik

Add-in ini mencakup lusinan grup profesional, dengan 300+ opsi akan mengotomatiskan sebagian besar tugas harian Anda di Excel, dan meningkatkan produktivitas Anda setidaknya hingga 50%. Seperti grup optons satu klik dan konversi batch.
Sekarang kesempatan Anda untuk mempercepat diri Anda dengan Kutools for Excel!


Comments (168)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I have a system that generates an excel file everyday. The daily file name is of format "<filename-12282021>". The 12282021 is the timestamp and it changes everyday creating a new excel file each day. I want to create a Master Workbook and then append the contents of the daily excel file into that master workbook. How can I automate it so it happens by itself everyday and the master file is update with contents of the daily file.   Thank you.
This comment was minimized by the moderator on the site
Hi rd2022, sorry that I have no idea to solve your problem so far. You can go to our forum https://www.extendoffice.com/forum/excel.html to leave this message, maybe some users have the same problem and has been solved.
This comment was minimized by the moderator on the site
In combining shhets I want to add one extra column in combined sheet as ShhetName
Can you suggest ?
This comment was minimized by the moderator on the site
The Combine function of Kutools for Excel can help you to insert sheet name in a new row of each combined range in the combined sheet by checking First row of each range (new row) in Insert worksheet information section in the last step of the Combine.
This comment was minimized by the moderator on the site
Hi - this function works well except my file has more than 900 sheets, and when I change the maximum number of rows (Loc 16, "A65536") to a higher number, the macro doesn't work. Is there a way to increase the number of rows that can be shown on the combine sheet?
This comment was minimized by the moderator on the site
The VBA code works fine but I want the data to be merged horizontally(side by side).
Hope you can help.
This comment was minimized by the moderator on the site
Hi,


Great Code and for the most part it works fantastically well.


Could I suggest creating a written tutorial for each line of code. I'd love to be able to play around with it to suit my Company's needs.

In the meantime however could you talk me through problems that would hinder this code from copying all data from each Sheet? I've noticed some sheets in my workbook aren't being copied at all.

To give you some context I'm dealing with roughly 330 sheets and they hold from 50 to 500 lines in each.


looking forward to hearing from you.
This comment was minimized by the moderator on the site
Hi, Daniel, I do not understand your question as you describe it not clearly, but if you have the Combine function in Excel, it can solve most of your question about combining sheets.
This comment was minimized by the moderator on the site
Hi,

Is it possible to only copy a particular range of cells for example A:4:FU38 from each sheet?


Also in the Combined sheet where the data is copied to, can the tab names from where the data is copied included in column A to enable lookups or to pivot the data?


Finally, can i specify the list of worksheets from which to copy the data across or maybe i can specify something like copy all worksheets to the left of a particular worksheet in the file.


Thanks in advance for your help
This comment was minimized by the moderator on the site
Hi, HS, you mean to combine same ranges from sheets into one sheet, it that right? If so, this article may help you: https://www.extendoffice.com/documents/excel/2754-excel-combine-ranges-from-different-worksheets-into-one.html#a3
This comment was minimized by the moderator on the site
This VBA code is an absolute lifesaver. Thank you!!
This comment was minimized by the moderator on the site
Hi. This code works well but I have the same problem as adj. The 1st row form each tab doesn't appear in the combined tab - except he first tab. Thanks
This comment was minimized by the moderator on the site
Just delete "Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select" from the code.

If you want to merge all rows from all worksheets, just use the code:

Sub Combine()

'UpdatebyExtendoffice

Dim J As Integer

On Error Resume Next

Sheets(1).Select

Worksheets.Add

Sheets(1).Name = "Combined"

Sheets(2).Activate

Range("A1").EntireRow.Select

Selection.Copy Destination:=Sheets(1).Range("A1")

For J = 2 To Sheets.Count

Sheets(J).Activate

Range("A1").Select

Selection.CurrentRegion.Select

Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)

Next

End Sub
This comment was minimized by the moderator on the site
Yes, the code only can keep first row of the first tab, because it is used to consolidate, if you want to keep all contents of each sheet, you can try Combine utility of Kutools for Excel, it is free fior 60 days
This comment was minimized by the moderator on the site
i had a problem when I try to combine all same name worksheet to one worksheet, it works but some value are missing. so what should i do?
This comment was minimized by the moderator on the site
Hello, elok, did the problem appear while you applying Combine function? If so, please go to contact us to describe the problem with more details, our support will handle the problem for you.
This comment was minimized by the moderator on the site
Thanks that macro saved my day. I had over 40 sheets of data to combine into one and although my computer bogged for a minute or two, it completed without issue. The only modification I made was I tweaked the macro to start with A2 instead of A1 since A1 was my column headers.
This comment was minimized by the moderator on the site
Thanks for your support, Andrew, I am glad that the macro can help 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