Sub Gop_Du_Lieu_TongQua() ' Mo thu muc, chon nhieu file, gop vao mot file
' Tao thu muc mo file
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = True 'Chon nhieu file cung luc
.Show 'Hien cua so chon file
' Xac dinh file duoc chon
Dim i As Long
For i = 1 To .SelectedItems.Count
'Gan bien cho cac Workbook
Dim wb_KQ As Workbook
Dim wb_Select As Workbook
Set wb_KQ = ThisWorkbook
Set wb_Select = Workbooks.Open(.SelectedItems(i))
'Dua du lieu tu cac workbook khac
'Xac dinh dong cuoi cua Wb2
Dim DongCuoi_wb2 As Long
DongCuoi_wb2 = wb_Select.Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
'Xac dinh khoang cach so dong du lieu
'Khoang cach = Dong cuoi - Dong dau
Dim DongDau_wb2 As Long
DongDau_wb2 = 2
Dim KhoangCach_wb2 As Long
KhoangCach_wb2 = DongCuoi_wb2 - DongDau_wb2 + 1
'Noi nhan
'Tim dong cuoi cua noi nhan la dong diem bat dau
'Pham vi cua vung nhan la khoang cach
Dim DongCuoi_wb4 As Long
DongCuoi_wb4 = wb_KQ.Sheets("Data").Range("A" & Rows.Count).End(xlUp).Row
'Dua du lieu vao
wb_KQ.Sheets("Data").Range("A" & DongCuoi + 1 & ":C" & DongCuoi_wb4 + KhoangCach_wb2).Value = wb_Select.Sheets("Sheet1").Range("A" & DongDau_wb2 & ":C" & DongCuoi_wb2).Value
'Dong wb lai
wb_Select.Close SaveChanges:=False
Next i
End With
"Em làm như trên nhưng kết quả trả về là book 3 ghi đè lên dòng tiêu đề, book1 và book 2 thì báo lỗi #N/A. Nhờ thầy xem giúp em ạ.