Using an Exit Do Statement
Sub Lottery_2() Dim sngWin As Single Do Until sngWin > 2000 sngWin = Rnd * 2100 If sngWin < 500 Then Debug.Print "less than 500" Exit Do End If Debug.Print sngWin Loop End Sub