Bonjour,
une proposition qui passe par la création d'un index "nom de fichier-paramètre"
Sub aargh()
rep = "d:\downloads\" 'nom du répertoire contenant les fichiers (à adapter)
With Sheets("index")
dl = .Cells(Rows.Count, 1).End(xlUp).Row 'dernière ligne de l'index
v = InputBox("paramètre")
If v <> "" Then
Set re = .Cells(1, 2).Resize(dl).Find(v, lookat:=xlWhole)
If Not re Is Nothing Then
MsgBox "nom du fichier à ouvrir" & vbCrLf & re.Offset(, -1)
Else
'on crée/met à jour l'index en recherchant le paramètre dans les fichiers
nf = Dir(rep & "*.xlsx")
Do While nf <> ""
Set re = .Cells(1, 1).Resize(dl).Find(nf, lookat:=xlWhole)
'on vérifie si le fichier est déjà présent dans l'index
If re Is Nothing Then 'pas présent
Set wb = Workbooks.Open(rep & nf) 'on ouvre le fichier
va = wb.Sheets(1).Cells(1, 1) 'le paramètre se trouve en cellule A1 du premier onglet (à adapter)
dl = dl + 1
.Cells(dl, 1) = nf 'nom du fichier
.Cells(dl, 2) = va 'valeur du paramètre
wb.Close False
If va = v Then
MsgBox "nom du fichier à ouvrir" & vbCrLf & nf
Exit Do
End If
End If
nf = Dir()
Loop
End If
End If
End With
End Sub