Làm cách nào để thu thập dữ liệu từ nhiều trang tính vào một trang tính chính trong Excel?
Trong một số trường hợp, bạn có thể cần thu thập dữ liệu từ nhiều trang tính vào một trang tính chính để hợp nhất hoặc thực hiện các thao tác khác như hình minh họa bên dưới, nhưng để sao chép và dán từng nội dung một thì rất rắc rối, có thủ thuật nào có thể nhanh chóng giải quyết nó trong Excel?
Thu thập dữ liệu từ nhiều trang tính thành một với chức năng Hợp nhất
Thu thập dữ liệu từ nhiều trang tính thành một với mã VBA
Thu thập dữ liệu từ nhiều trang tính thành một với chức năng Kết hợp mạnh mẽ
Thu thập dữ liệu từ nhiều trang tính thành một với chức năng Hợp nhất
Nếu bạn muốn thu thập dữ liệu từ nhiều trang tính vào một trang tính trong cùng một sổ làm việc, bạn có thể áp dụng chức năng Hợp nhất trong Excel.
1. Trong trang tính mới của sổ làm việc mà bạn muốn thu thập dữ liệu từ trang tính, hãy bấm Ngày > Củng cố.
2. bên trong Consolidate hộp thoại, hãy làm như sau:
(1 Chọn một thao tác bạn muốn thực hiện sau khi kết hợp dữ liệu trong Chức năng danh sách thả xuống;
(2 Nhấp chuột để chọn phạm vi của mỗi trang tính bạn muốn thu thập;
(3 Nhấp chuột Add để thêm dải dữ liệu vào All references hộp danh sách;
(4 Kiểm tra các nhãn bạn sử dụng sau khi kết hợp dữ liệu và kiểm tra Create links to source data nếu bạn muốn liên kết dữ liệu trong trang tính kết hợp với dữ liệu nguồn.
3. nhấp chuột OK. Bây giờ dữ liệu đã được thu thập và tổng hợp trong một trang tính.
Dễ dàng kết hợp nhiều trang tính / Sổ làm việc thành một Trang tính hoặc Sổ làm việc
|
Để kết hợp nhiều trang tính hoặc sổ làm việc thành một trang tính hoặc sổ làm việc có thể khó khăn trong Excel, nhưng với Kết hợp trong Kutools cho Excel, bạn có thể kết hợp hợp nhất hàng chục trang tính / sổ làm việc thành một trang tính hoặc sổ làm việc, ngoài ra, bạn có thể hợp nhất các trang tính thành một chỉ bằng vài cú nhấp chuột. Nhấp để xem đầy đủ tính năng 30 ngày dùng thử miễn phí! |
![]() |
Kutools cho Excel: với hơn 300 bổ trợ Excel tiện dụng, dùng thử miễn phí không giới hạn về số lượng 30 ngày |
Thu thập dữ liệu từ nhiều trang tính thành một với mã VBA
Đây là một mã VBA có thể thu thập dữ liệu từ tất cả các trang tính trong một trang tính mới trong sổ làm việc hiện tại.
1. nhấn Alt + F11 chìa khóa để kích hoạt Microsoft Visual Basic for Applications cửa sổ.
2. nhấp chuột Insert > Modulevà sao chép và dán mã bên dưới vào Module kịch bản.
VBA: Thu thập tất cả dữ liệu từ các trang tính thành một.
Sub Combine()
'UpdatebyExtendoffice20180205
Dim I As Long
Dim xRg As Range
On Error Resume Next
Worksheets.Add Sheets(1)
ActiveSheet.Name = "Combined"
For I = 2 To Sheets.Count
Set xRg = Sheets(1).UsedRange
If I > 2 Then
Set xRg = Sheets(1).Cells(xRg.Rows.Count + 1, 1)
End If
Sheets(I).Activate
ActiveSheet.UsedRange.Copy xRg
Next
End Sub

3. Press F5 key to run the code, all data of the whole workbook has been collected in the new sheet Combined.

Collect data from multiple sheets into one with powerful Combine function
If you usually need to combine sheets into one, I introduce one powerful combine function for you, it’s Kutools for Excel’s Combine utility which have below four main functions:
Combine multiple worksheets from workbook into one worksheet
Combine all same name worksheets into one worksheet
Combine multiple worksheets from workbooks into one workbook
Consolidate and calculate values across multiple workbooks into one worksheet

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier.
After free installing Kutools for Excel, please do as below:
If you just want to combine sheets into one sheet without any other operations, you can do as these:
1. Enable Excel, click Kutools Plus > Combine, there is one or two dialogs pop out to remind you some notices, just click OK and Yes to continue. See screenshot:

2. Click OK to go to the Combine window, check Combine multiple worksheets from workbook into worksheet option.

3. Click Next, then click Add > File / Folder to add workbooks you will use to combine into the Workbook list. Then go to Worksheet list to check the sheets you want to combine form each workbooks.

4. Click Next to go to the last step, you can specify some setting about the combine result as you need. If you do not need this step.

5. Click Finish and select one folder to place the new workbook which combine data from sheets.

6. Click Save. Now all data has been collected from sheets across workbook into one master sheet.

Combine all sheets from workbooks into one worksheet
If you want to consolidate worksheets across workbooks into one, do as these:
1. In the Combine window, check Consolidate and calculate values across multiple worksheets into one worksheet option.

2. Click Next, and add files into Workbook list, then check the sheets you use to combine and calculate.

3. Click Next, then select one calculation from Function drop down list, and check other options as you need.

4. Click Finish to save the new workbook into a folder.
Now the sheets across workbooks have been consolidated and calculated into one sheet.

Comsolidate worksheets from workbooks into one sheet
Kutools for Excel: 300 functions you must have in Excel, 30-day free trial from here.
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.
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!
Sort comments by
#27070
This comment was minimized by the moderator on the site
0
0
#27071
This comment was minimized by the moderator on the site
Report
0
0
#28253
This comment was minimized by the moderator on the site
0
0
#30277
This comment was minimized by the moderator on the site
0
0
#30278
This comment was minimized by the moderator on the site
0
0
#33567
This comment was minimized by the moderator on the site
0
0
#34742
This comment was minimized by the moderator on the site
0
0
#36151
This comment was minimized by the moderator on the site
0
0
There are no comments posted here yet