Hi my problem is with nested For and If statements
I am trying to test a condition within a For Next loop however the Next loop is also at the end of the testing. Is this achievable?
Any ideas
Code:
For Leg1rns = 2 To Runs1 + 1
NoLeg1 = Data.Cells(Leg1rns, 3).Value
For Leg2rns = 2 To Runs2 + 1
NoLeg2 = Data.Cells(Leg2rns, 5).Value
If NoLeg2 = NoLeg1 Then ???? 'Step the For statement count (Leg2rns) if true
For Leg3rns = 2 To Runs3 + 1
NoLeg3 = Data.Cells(Leg3rns, 7).Value
If NoLeg3 = NoLeg1 Or NoLeg3 = NoLeg2 Then ???? 'Same as Leg2rns
Next Leg3rns
Next Leg2rns
Next Leg1rns
Any ideas