Public Sub copyto()
Dim cell As Range, wb As Workbook, twb As Workbook, dwb As Workbook
Dim nname As String, lwf As String, dwf As String
Application.Screenupdating = false
Set twb = ThisWorkbook
Set dwb = Workbooks.Open(Range("B2"))
twb.Activate
For Each cell In Range("A5", Cells(Rows.Count, 1).End(xlUp))
If cell.Value <> "" Then
lwf = cell.Value
dwb.Activate
With twb
cell.Offset(0, 1) = Cells.Find(lwf, after:=Cells(1, 1), lookat:=xlWhole, Searchdirection:=xlNext, Searchorder:=xlByRows).Offset(0, 4)
cell.Offset(0, 2) = Cells.Find(lwf, after:=Cells(1, 1), lookat:=xlWhole, Searchdirection:=xlNext, Searchorder:=xlByRows).Offset(0, 8)
End With
End If
Next cell
twb.Activate
dwb.Close savechanges = False
Application.screenupdating = true
End Sub
Please let me know if this does the job.
Bookmarks