Answers for "vba do until"

VBA
0

vba do until

Sub ExitExample() 
    counter = 0 
    myNum = 9 
    Do Until myNum = 10 
        myNum = myNum - 1 
        counter = counter + 1 
        If myNum < 10 Then Exit Do 
    Loop 
    MsgBox "The loop made " & counter & " repetitions." 
End Sub
Posted by: Guest on February-05-2021
0

do until loop vba

Not IsEmpty(Cells(i, 1)) OR Not IsEmpty(Cells(i, 2))
Posted by: Guest on April-27-2020
0

do until loop vba

Sub combineNamesWhile()
 i = 2
 Do While Not IsEmpty(Cells(i, 1)) OR Not IsEmpty(Cells(i, 2))
   If IsEmpty(Cells(i, 1)) Then
     Cells(i, 3).Value = Cells(i, 2)
   ElseIf IsEmpty(Cells(i, 2)) Then
     Cells(i, 3).Value = Cells(i, 1)
   Else
     Cells(i, 3).Value = Cells(i, 1) & " " & Cells(i, 2)
   EndIf
   i = i +1
   Loop
End Sub
Posted by: Guest on April-27-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language