J'ai visiblement encore besoin de ton aide parce que je n'arrive pas à récupérer le nom des feuilles de l'autre classeur...
Ça me dit "incompatibilité de type" pour ça : Set wsS = Workbooks("Source.xlsm").Worksheets()
Pourrais-tu me débloquer ?
Sub CroisementDonnees()
Application.ScreenUpdating = False
Dim wsS As Worksheet 'fichier source
Dim wsC As Worksheet 'fichier cible
Dim ws As Worksheet
Dim S As Range 'plage fichier source
Dim C As Range 'plage fichier cible
Set wsS = Workbooks("Source.xlsm").Worksheets()
Set wsC = Workbooks("Cible.xlsm").Worksheets()
For Each ws In Workbooks("Cible.xlsm").Sheets
If ActiveSheets.Name <> wsS.Name Then
GoTo fin
Else
For Each C In wsC.Range("A2:A" & wsC.Range("A" & Rows.Count).End(xlUp).Row)
Set S = wsS.Columns("A").Find(C, , xlValues, xlWhole)
If Not S Is Nothing Then
S.Offset(0, 1).Copy C.Offset(0, 1)
Else
C.Offset(0, 1).Value = "Manquant"
End If
Next C
Set wsC = Nothing: Set wsS = Nothing
End If
fin:
Next ws
End Sub
Merci!
BZH83