I'm using this code to look up the column from a variable cell position. When I find the matching value I would like the Loop to End.
r = 1
Do
If .Cells(lngRow - r, 16) = strCode Then
lngLevel = .Cells(lngRow - r, 2).Value
'Place statement here to exit the Loop
ElseIf .Cells(lngRow - r, 16) <> strCode Then
r = r + 1
End If
Loop
r = 1
Do
If .Cells(lngRow - r, 16) = strCode Then
lngLevel = .Cells(lngRow - r, 2).Value
'Place statement here to exit the Loop
ElseIf .Cells(lngRow - r, 16) <> strCode Then
r = r + 1
End If
Loop