Bonjour
J'ai fait cette macro (a l'aide des forums) mais j'ai une erreur de compilation next sans for et je ne comprends pourquoi. Voici ce que j'ai fait :
Sub Exporter()
Dim ln, lgn, col, fs
Dim nf As String
Application.ScreenUpdating = False
Set fs = ActiveSheet
For ln = 2 To fs.Range("T" & Rows.Count).End(xlUp).Row
nf = fs.Range("T" & ln)
If (nf = "44w") And fs.Range("I" & ln) <> "X" Then
For i = 1 To Worksheets.Count
If Worksheets(i).Name = nf Then
lgn = Sheets(nf).Range("T" & Rows.Count).End(xlUp)(2).Row + 1
fs.Range("T" & ln & ":I" & ln).Copy Sheets(nf).Range("T" & lgn)
fs.Range("I" & ln) = "X"
End If
Next i
Next ln
MsgBox "Exportations terminées"
End Sub
Pouvez-vous m'aider SVP
Merci
Haut