2016-11-18 1 views
0

continue 문을 사용하여 다음 반복을 위해 루프를 건너 뛰는 방법. 이 코드는 간다 조건이 실패 할 경우 루프가 다음 반복Excel VBA Do while 루프 건너 뛰기

위해 이동해야합니다 수 있도록 다음과 같이

Do While i<50 
    If IsEmpty(Cells(EndRow, 25)) = False Then 
     Continue Do 
    Else 
     Cells(EndRow, 25).Interior.ColorIndex = 37 
    i = i+1 
LOOP 

답변

1

을 어쩌면 당신이

Do While i < 50 
    If IsEmpty(Cells(EndRow, 25)) Then Cells(EndRow, 25).Interior.ColorIndex = 37 
    i = i + 1 
Loop 
후있어