Thread: For next index
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default For next index

Hi

no_values = True
marker = 0
Dim thecells As Range
For Each thecells In Range("quantity_range")
marker = marker + 1
If thecells.Value < 0 Then
no_values = False
End If
If no_values = False then Exit for
Next
msgbox "Loop was exited on iteration " & marker

regards
Paul