In code, what you are asking for looks like this;
' scan column 1
For MyRow = StartRow to EndRow
' get the value
MyValue = Range("A"+Cstr(MyRow)).Value
' check the value
If MyValue = i then
' run some code
RunSomething
' exit the sub
Exit Sub
End If
Next MyRow
' scan column 2
For MyRow = StartRow to EndRow
' get the value
MyValue = Range("B"+Cstr(MyRow)).Value
' check the value
If MyValue = i then
' run some code
RunSomething2
' exit the sub
Exit Sub
End If
Next MyRow
MsgBox "There was an error."
Bookmarks