vba do whule code example
Example 1: vba do while
' OPTION 1
i =0
Do While i < 3 'Check Condition at the START of the loop
' Do something
i = i + 1
Loop
'OPTION 2
i =0
Do
' Do something
i = i + 1
Loop While i < 3 'Check Condition at the END of the loop
Example 2: do until loop vba
Not IsEmpty(Cells(i, 1)) OR Not IsEmpty(Cells(i, 2))