Sub copykl()
Dim wb As Workbook, wbtong As Workbook, FileName, i As Integer, j As Integer, dong As Integer
Dim R&, Lr&, dCuoi&, S, TenFile As String
Dim Sh As Worksheet, Ws As Worksheet, Rng As Range
Dim KQ()
Set wbtong = ThisWorkbook
Set Sh = Sheet1
dCuoi = Sh.Range("C" & Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False
FileName = Application.GetOpenFilename("All,*.*", , "chon file", , True)
ReDim KQ(1 To UBound(FileName), 1 To 6)
For i = LBound(FileName) To UBound(FileName)
Set wb = Workbooks.Open(FileName(i))
S = Split(Dir(FileName(i)), ".")
TenFile = S(1)
Set Ws = wb.Sheets("Sheet1")
Lr = Ws.Range("A" & Rows.Count).End(xlUp).Row
If Not Ws.Range("A6:A" & Lr).Find("tong") Is Nothing Then
R = Ws.Range("A6:A" & Lr).Find("tong").Row
Set Rng = Ws.Range("B" & R).Resize(, 4)
t = t + 1
KQ(t, 1) = TenFile
For j = 1 To Rng.Columns.Count
KQ(t, j + 2) = Rng(1, j)
Next j
End If
wb.Close False
Next i
If t Then
Sh.Range("C6:J" & Lr).ClearContents
Sh.Range("C6").Resize(t, 6) = KQ
End If
Application.ScreenUpdating = True
End Sub