Sub Set_Compil()
Dim Wc As Worksheet, Wd As Worksheet
Dim Cell_Deb As Range, Cell_Fin As Range, Cell_Ref As Range
Set Wc = Worksheets("Compilation"): If Wc Is Nothing Then Exit Sub
Wc.Activate
Set Cell_Deb = Wc.[A11]
Set Cell_Fin = Wc.Cells(Wc.Rows.Count, Cell_Deb.Column).End(xlUp)
Cell_Deb.EntireColumn.NumberFormat = "@"
On Error Resume Next
For J = Cell_Deb.Row To Cell_Fin.Row
Set Cell_Ref = Cells(J, Cell_Deb.Column)
Set Wd = Worksheets(Cell_Ref.Value)
Debug.Print Wd.CodeName & "=" & Wd.Name, Cell_Ref.Address & "=" & Cell_Ref.Value,
If Not Wd Is Nothing Then
Wc.Cells(J, Cell_Deb.Column + 1).Resize(, 6).Value = Application.Transpose(Wd.Cells(1, "Z").Resize(6))
Debug.Print Wc.Cells(J, Cell_Deb.Column + 1).Resize(, 6).Address, "Writed"
Else
Wc.Cells(J, Cell_Deb.Column + 1).ClearContents
Debug.Print , Cell_Ref.Address & "=" & Cell_Ref.Value, Wc.Cells(J, Cell_Deb.Column + 1).Resize(, 6).Address, "Cleared"
End If
Set Wd = Nothing
Next
Set Wc = Nothing
End Sub