For x1 = LigneDébut To LigneFin If Cells(x1, 11) 0 Then ' 11 Colonne K Cells(x1, 11).Select ActiveCell.Value = 1 x2 = 2 ' Init compteur pour ,la prochaine ligne ActiveCell.OffSet(1, 0).Select ' Ligne suivante ' Si la cellule vaut 0, on sort Do While ActiveCell.Value <> 0 ActiveCell.Value = x2 x2 = x2 + 1 ' Incrémente compteur If x2 > 3 Then x2 = 1 ' ReInit compteur si > 3 ActiveCell.OffSet(1, 0).Select ' Ligne suivante DoEvents Loop ' Prochaine ligne = dernière ligne traitée x1 = ActiveCell.Row End If Next x1