Sub movefile()
Dim src As String
Dim dst As String
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
inarr = Range(Cells(1, 1), Cells(lastrow, 4))
For i = 3 To lastrow
'You can change the path and file name
src = inarr(i, 2)
dst = inarr(i, 3)
Name src As dst
Next i
End Sub
Sure. Thanks.Cross posted move files from Source Folder to Destination Folder, based on file name & Path
While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
try this:
VBA Code:Sub movefile() Dim src As String Dim dst As String lastrow = Cells(Rows.Count, "A").End(xlUp).Row inarr = Range(Cells(1, 1), Cells(lastrow, 4)) For i = 3 To lastrow 'You can change the path and file name src = inarr(i, 2) dst = inarr(i, 3) Name src As dst Next i End Sub