J
jamasm2010
Hi,
Is it possible to start a Do/Loop with a conditional statement? The code I have is:
If Education = False Then
Class = Range("H" & LastRow).Value
Do While Cells(LastRow, 8).Value = Class And LastRow <> 1
Else
Do While LastRow <> 1
Class = Range("H" & LastRow).Value
End If
and this is nested in a For/Next routine. When I attempt to run it, I get a "Compile error: Else without If." There is a similar error if I try to use Select/Case routine. If what I'm trying to do isn't possible, then is there a work around to it?
Thanks,
James
Is it possible to start a Do/Loop with a conditional statement? The code I have is:
If Education = False Then
Class = Range("H" & LastRow).Value
Do While Cells(LastRow, 8).Value = Class And LastRow <> 1
Else
Do While LastRow <> 1
Class = Range("H" & LastRow).Value
End If
and this is nested in a For/Next routine. When I attempt to run it, I get a "Compile error: Else without If." There is a similar error if I try to use Select/Case routine. If what I'm trying to do isn't possible, then is there a work around to it?
Thanks,
James