I currently have a macro set up to find values in a range, however some values dont exist in the column and as such i end up getting an error 91. To get around this, i want it to find the next range. My current macro is as follows.
VBA Code:
Sub xfg()
Dim findnextGL As Range
Dim nextGL As Integer
nextGL = 51
Do Until nextGL = 1001
Set findnextGL = Range("B02:B4899").Find(nextGL, LookIn:=xlValues)
If findnextGL Is Nothing Then
Debug.Print error 91
Exit Sub
Else
Debug.Print findnextGL.Address
nextGL = nextGL + 50
End If
Loop
End Sub