Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
For next index
The code below has a for next loop in it
how can I find out the "position" , ie is it the first time through the loop, the last or the "n" th time through the loop. I would be most gratefull if someone could enlighten me Thanks in advance David no_values = True Dim thecells As Range For Each thecells In Range("quantity_range") If thecells.Value < 0 Then no_values = False End If Next |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
INDEX and sum | Excel Discussion (Misc queries) | |||
Chart axes color index vs font color index | Charts and Charting in Excel | |||
How do I pull the col. index value as well as row index value | Excel Discussion (Misc queries) | |||
index/index | Excel Worksheet Functions | |||
Index Row | Excel Worksheet Functions |