Sub a()
Dim Test$, arrWBK
Dim Source1(), Source2(), Cible()
Dim MaPlage As Range, DerLig As Long, Wk5 As Workbook
'Ajout
Dim Ws5 As Worksheet
arrWBK = Array("classeur1.xls", "classeur2.xls","classeur3.xls", "classeur4.xls")
'Ajout
Set Wk5 = Workbooks("classeur5.xls")
'Ajout
Set Ws5 = Wk5.Worksheets("Feuil1")
Source1 = Array("J", "H", "I", "AG", "AB", "V", "W", "Y", "Z")
Source2 = Array("AK", "AM", "W", "X", "Y", "Z", "AI", "AJ", "AP", "AS", "AE", "AG")
Cible = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V")
'A remanier
For i = 0 To UBound(arrWBK)
For j = 0 To UBound(Source1)
With Workbooks(arrWBK(i)).Sheets(1)
DerLig = .Cells(65536, Source1(j)).End(xlUp).Row
MsgBox "Derlig= " & DerLig
Set MaPlage = Cells(2, CStr(Source1(j))).Resize(DerLig)
Test = Workbooks(arrWBK(i)).Name & ": " & .Name & ": " & MaPlage.Address
MsgBox Test
'Ajout
MaPlage.Copy Destination:=Ws5.Range(Cible(j) & 2)
Set MaPlage = Nothing
End With
Next j
Next i
'Ajout
Set Ws5 = Nothing
'Ajout
Set Wk5 = Nothing
End Sub