Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Nest If statement in Do Loop Until for cells

Sub m()     Dim I As Integer     I = 1     Do        If (Cells(I, "A").Value = "A") Then           MsgBox ("I found a A in row " & Str(I))        End If        I = I + 1     Loop Until (Cells(I, "A").Value = "") End Sub