Public Sub extraction()
Dim DerL As Long, L As Long, Li As Long, Cel As Range
Application.ScreenUpdating = False
Worksheets("feuil3").Cells.Clear
With Worksheets("nomsphotos")
liste = .Range("A1:A" & .Range("A1000").End(xlUp).Row)
End With
For L = 1 To UBound(liste, 1)
liste(L, 1) = Mid(liste(L, 1), InStr(liste(L, 1), "_") + 1)
Next
With Worksheets("bdd")
DerL = .Range("A1000").End(xlUp).Row
For L = 1 To UBound(liste, 1)
Set Cel = .Columns(1).Find(CStr(liste(L, 1)), LookIn:=xlValues, LookAt:=xlWhole)
If Not Cel Is Nothing Then
Li = Worksheets("feuil3").Range("A1000").End(xlUp).Row + 1
.Range("A" & Cel.Row & ":M" & Cel.Row).Copy Destination:=Worksheets("feuil3").Range("A" & Li)
End If
Next
End With
Worksheets("feuil3").UsedRange.Columns.AutoFit
Application.ScreenUpdating = True
End Sub