ConsultantJP
XLDnaute Occasionnel
Bonjour à tous, je cherche à faire sortir d'une boucle lorsque j'ai trouver un résultat mais je ne retrouve pas la syntaxe.
Merci par avance.
Merci par avance.
[COLOR="SeaGreen"]'traitement[/COLOR]
For i = [I]début[/I] To [I]fin[/I]
[COLOR="SeaGreen"]'traitement[/COLOR]
If [I]condition de sortie[/I] Then Exit For
[COLOR="SeaGreen"]'traitement[/COLOR]
Next i
[COLOR="SeaGreen"]'traitement[/COLOR]
Sub ChercheTotoColonne1()
For i = 1 To Range("A65000").End(xlUp).Row
If Cells(i, 1) = "Toto" Then
Flag = True
[COLOR="RoyalBlue"][B]Exit For[/B][/COLOR]
End If
Next
If Flag = True Then MsgBox "Toto est présent"
End Sub