Option Explicit
Sub compléter_feuille_serieA()
Dim Fa As Worksheet, F0 As Worksheet, c As Range, IdFac As Range
Dim plageIdFac As Range, col As Byte, dl_Fa As Integer
Set Fa = ThisWorkbook.Sheets("SERIE A")
dl_Fa = Fa.Range("E" & Rows.Count).End(xlUp).Row
Fa.Range("I11:O" & dl_Fa).ClearContents 'on efface la plage
Set plageIdFac = Fa.Range("E11:E" & Fa.Range("E" & Rows.Count).End(xlUp).Row)
Set F0 = ThisWorkbook.Sheets("0")
For Each c In F0.Range("F2:F" & F0.Range("F" & Rows.Count).End(xlUp).Row)
c.Value = c.Value
col = IIf(c.Offset(, -2).Value = "IP4", 5, 4)
Set IdFac = plageIdFac.Find(what:=c.Value, LookIn:=xlValues, LookAt:=xlWhole)
If Not IdFac Is Nothing Then
Debug.Print IdFac & " - " & IdFac.Row
If c.Offset(, 2).Value = "" Or c.Offset(, 2).Value = 0 Then
IdFac.Offset(, col) = "test à refaire"
Else
IdFac.Offset(, col) = c.Offset(, 2)
End If
Else
MsgBox c & " non trouvé!" 'si code ne se trouve en feuille serieA
End If
Next c
End Sub