[COLOR=blue]Sub CopyData()[/COLOR]
[COLOR=blue] Dim Masterwk, my3wk As Workbook[/COLOR]
[COLOR=blue] Dim Masterws, my3ws As Worksheet[/COLOR]
[COLOR=blue] Dim i As Integer[/COLOR]
[COLOR=blue] Set Masterwk = ActiveWorkbook[/COLOR]
[COLOR=blue] Set Masterws = Masterwk.Worksheets("Plan1")[/COLOR]
[COLOR=blue] Masterws.Activate[/COLOR]
[COLOR=blue] For i = 1 To 3[/COLOR]
[COLOR=blue] Workbooks.Open ThisWorkbook.Path & "\Pasta" & i[/COLOR]
[COLOR=blue] Set my3wk = ActiveWorkbook[/COLOR]
[COLOR=blue] Set my3ws = my3wk.Worksheets("Plan1")[/COLOR]
[COLOR=blue] my3ws.Activate[/COLOR]
[COLOR=blue] If Masterws.Range("A1").Value = "" Then[/COLOR]
[COLOR=blue] my3ws.Range("MyRange").Copy _[/COLOR]
[COLOR=blue] Masterws.Range("A1")[/COLOR]
[COLOR=blue] Masterwk.Activate 'Test[/COLOR]
[COLOR=blue] Else[/COLOR]
[COLOR=blue] LastRow = Masterws.Range("A" & Rows.Count).End(xlUp).Row[/COLOR]
[COLOR=blue] my3ws.Range("MyRange").Offset(1, 0).Copy _[/COLOR]
[COLOR=blue] Masterws.Range("A" & LastRow + 1)[/COLOR]
[COLOR=blue] Masterwk.Activate 'Test[/COLOR]
[COLOR=blue] End If[/COLOR]
[COLOR=blue] Application.CutCopyMode = False[/COLOR]
[COLOR=blue] my3wk.Close SaveChanges:=False[/COLOR]
[COLOR=blue] Next i[/COLOR]
[COLOR=blue] Set my3ws = Nothing[/COLOR]
[COLOR=blue] Set my3wk = Nothing[/COLOR]
[COLOR=blue] Set Masterws = Nothing[/COLOR]
[COLOR=blue] Set Masterwk = Nothing[/COLOR]
[COLOR=blue]End Sub[/COLOR]