Salut Loumie,
quand tu changes un iota à ta feuille de données, il faut adapter CHAQUE ligne de ton code!
Je te laisse jouer au jeu des 7 erreurs!
Sub Date_exclus()
'
Dim tTab
'
fm_MsgBoxINPUT.Show
'
Worksheets("Feuil2").UsedRange.Delete
With Worksheets("Feuil1")
iRow = .Cells(Rows.Count, 1).End(xlUp).Row
tTab = .Range("A5:H" & iRow)
'
Do
iFlag = Int(Rnd * UBound(tTab, 1)) + 1
If Val(Mid(tTab(iFlag, 7), 1, 4)) > Cells(1, 11) And Val(Mid(tTab(iFlag, 7), 5, 2)) > Cells(2, 11) And Trim(tTab(iFlag, 8)) = "FN" Then
tTab(iFlag, 7) = 0
iLig = iLig + 1
Sheets("Feuil2").Range("A" & iLig & ":H" & iLig).Value = .Range("A" & iFlag + 4 & ":H" & iFlag + 4).Value
End If
iFlag1 = iFlag1 + 1
Loop Until iLig = 83 Or iFlag1 = 30000
End With
'
End Sub
A+