Sub test()
Dim fso As Object, arrFile As Variant
Dim sFileName As String, sNote As String, sFolderNew As String, i As Long
Dim thisSheet As Worksheet
Set thisSheet = ThisWorkbook.ActiveSheet
i = thisSheet.Cells(thisSheet.Rows.Count, "C").End(xlUp).Row
If i < 4 Then Exit Sub
Set fso = CreateObject("Scripting.FileSystemObject")
arrFile = thisSheet.Range("C4:E" & i).Value
For i = LBound(arrFile, 1) To UBound(arrFile, 1)
sFileName = arrFile(1, 2) & arrFile(i, 1)
sFolderNew = arrFile(1, 3)
If fso.FileExists(sFileName) Then
If fso.FolderExists(sFolderNew) Then
sFileName = arrFile(1, 2) & "*" & arrFile(i, 1)
fso.CopyFile sFileName, sFolderNew
Else
MsgBox "Folder: " & sFolderNew & " không có.", vbCritical + vbOKOnly
Exit Sub
End If
Else
If Len(sNote) = 0 Then
sNote = "File: " & sFileName & " không có."
Else
sNote = sNote & vbNewLine & "File: " & sFileName & " không có."
End If
End If
Next i
MsgBox "Xong,kiem tra lai!" & vbNewLine & sNote, vbOKOnly + vbInformation
End Sub