X
xrull
Can anyone tell me how to modify this formula to trap errors? I tried
wrapping it in IsError (code) Then...but it doesn't work.
Public Sub RunMeNow()
Dim i As Long
Dim iLastRow As Long
With Sheets("Sheet2")
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 3 To iLastRow 'iLastRow to 1 Step -1
.Cells(i, "B").Value = Application.VLookup( _
.Cells(i, "A").Value, Range("RegionGrouping"), 2,
False)
Next i
End With
End Sub
Or any other way I can handle an error with this type of procedure.
Thanks,
Xrull
wrapping it in IsError (code) Then...but it doesn't work.
Public Sub RunMeNow()
Dim i As Long
Dim iLastRow As Long
With Sheets("Sheet2")
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 3 To iLastRow 'iLastRow to 1 Step -1
.Cells(i, "B").Value = Application.VLookup( _
.Cells(i, "A").Value, Range("RegionGrouping"), 2,
False)
Next i
End With
End Sub
Or any other way I can handle an error with this type of procedure.
Thanks,
Xrull