Salut
Ce code fait le même travail sans répéter les mots
Sub Cmd()
Application.ScreenUpdating = False
For t = 4 To 14
1 Sheets("Feuil1").Cells(t, 2) = Int((24) * Rnd + 1)
Sheets("Feuil2").Cells(t, 2) = _
Sheets("Feuil1").Range("A" & Val(Sheets("Feuil1").Cells(t, 2)))
x = Application.WorksheetFunction.CountIf( _
Sheets("Feuil1").Range("B4:B" & t), Sheets("Feuil1").Cells(t, 2))
If x > 1 Or Sheets("Feuil1").Cells(t, 2) < 5 Then GoTo 1
Next
Application.ScreenUpdating = True
End Sub