Sub Copie()
Dim lig As Integer, p As String, nomfich As String, f As String
Application.ScreenUpdating = False 'fige l'écran (pour accélérer)
Range("A2:D65536").ClearContents 'efface la plage de restitution
lig = 2 'restitution à partir de la ligne 2 (si titres en ligne 1)
p = ThisWorkbook.Path & "\"
nomfich = Dir(p & "*.xls") '1er fichier du dossier
While nomfich <> ""
If nomfich <> ThisWorkbook.Name Then
Cells(lig, 1) = nomfich 'nom du fichier en colonne A
f = "'" & p & "[" & nomfich & "]Feuil1'!C6" 'Feuil1 => nom de la feuille à adapter...
Cells(lig, 2).Formula = "=IF(" & f & "="""",""""," & f & ")"
f = "'" & p & "[" & nomfich & "]Feuil1'!C81"
Cells(lig, 3).Formula = "=IF(" & f & "="""",""""," & f & ")"
f = "'" & p & "[" & nomfich & "]Feuil1'!C83"
Cells(lig, 4).Formula = "=IF(" & f & "="""",""""," & f & ")"
Cells(lig, 2).Resize(, 3) = Cells(lig, 2).Resize(, 3).Value 'facultatif, si l'on veut supprimer les formules
lig = lig + 1
End If
nomfich = Dir 'fichier suivant du dossier
Wend
End Sub