Does this work for that?
Sub test()
Dim LastRow As Long
LastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
For i = 6 To LastRow
If Cells(i, 2) = "0890-fed" Or Cells(i, 2) = "0890-DBW" Then
If Not (Cells(i, 3) <= 10199 And Cells(i, 3) >= 10100) Or Cells(i, 3) = "Various" Then
GoTo errormsg
End If
End If
If Cells(i, 2) = 995 Then
If Not (Cells(i, 3) <= 17999 And Cells(i, 3) >= 17000) Or Cells(i, 3) = "Various" Then
GoTo errormsg
End If
End If
Next i
Exit Sub
errormsg:
MsgBox "You have problems", vbOKOnly
End Sub
Bookmarks