Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to force a change to a parameter in nested loops?
In other words, I want to compare two cells in different rows and, depending on the result, restart the loop counter from a different position. e.g.:- For x = 1 to 99 For y = x+1 to 100 If Cells(x,1) = Cells(y,1) Then Cells(y,1) = Range("y,3") x = 1 next y next x The compare could be true at , say , x= 3 and y = 30 but I need the test to recommence at x= 1 to take into account the new value in Cells(y,1) I've tried the above plus a few variations but without success TIA Stella |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
apart from missing an END IF you have code that should work OK in terms
of resetting X Stella wrote: Is it possible to force a change to a parameter in nested loops? In other words, I want to compare two cells in different rows and, depending on the result, restart the loop counter from a different position. e.g.:- For x = 1 to 99 For y = x+1 to 100 If Cells(x,1) = Cells(y,1) Then Cells(y,1) = Range("y,3") x = 1 next y next x The compare could be true at , say , x= 3 and y = 30 but I need the test to recommence at x= 1 to take into account the new value in Cells(y,1) I've tried the above plus a few variations but without success TIA Stella |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
nested ifs | Excel Discussion (Misc queries) | |||
Nested IF | Excel Worksheet Functions | |||
nested If | Excel Discussion (Misc queries) | |||
nested if based on nested if in seperate sheet. how? | Excel Worksheet Functions | |||
What is quicker? Nested or non nested ifs | Excel Programming |