Excel VBA跳过while while循环
如何使用continue语句跳过下一次循环的循环。 所以如果条件失败,循环必须进行下一次迭代
代码如下:
Do While i<50 If IsEmpty(Cells(EndRow, 25)) = False Then Continue Do Else Cells(EndRow, 25).Interior.ColorIndex = 37 i = i+1 LOOP
也许你是在这之后
Do While i < 50 If IsEmpty(Cells(EndRow, 25)) Then Cells(EndRow, 25).Interior.ColorIndex = 37 i = i + 1 Loop