hum...Mais le mois prévisionnel c'est pas la colonne M ? Je ne comprends plus trop là...
Pas la peine de mettre une formule, prenez se code là qui inclus la condition quand le mois prévisionnel n'est pas renseigné
Sub COPIEMOISPREVISIONNEL()
Dim dl&, i%, trouve As Range, m%, fc As Byte
For fc = 1 To Sheets.Count
If Sheets(fc).Name Like "FACT" & "*" Then
If Sheets(fc).[a3] <> "" Then
Sheets(fc).Range("a3:r" & Sheets(fc).Range("a" & Rows.Count).End(xlUp).Row).Clear
End If
End If
Next
dl = Feuil1.Range("a" & Rows.Count).End(xlUp).Row
With Feuil1
Set trouve = .Range("j2:j" & dl).Find("A", LookIn:=xlValues, lookat:=xlWhole)
If Not trouve Is Nothing And trouve.Offset(0, 3) <> "" Then
firstAddress = trouve.Address
Do
m = Feuil1.Range("m" & trouve.Row)
Range(.Cells(trouve.Row, 1), .Cells(trouve.Row, 18)).Copy Sheets(m + 2).[A65536].End(xlUp).Offset(1, 0)
Set trouve = .Range("j2:j" & dl).FindNext(trouve)
Loop While Not trouve Is Nothing And trouve.Address <> firstAddress
End If
End With
End Sub
Remerciement partagé. @+