Answer the question
In order to leave comments, you need to log in
How to check if a value is in a list in VBA?
Good afternoon.
I'm trying to implement validation:
For row_values = 2 To row_values_end
Call do_any_here
If something Then
For row_db = 2 To row_db_end
On Error GoTo error_handler
If data_base.Cells(row_db, 6).Value <> special_values Then Err.Raise 1013, "another_sub", "неверные данные"
Call do_any_there
On Error GoTo 0
Next row_db
End If
Next row_values
Answer the question
In order to leave comments, you need to log in
Found a workaround.
If data_base.Cells(row_db, 6).Value <> "энач1" Then If data_base.Cells(row_db, 6).Value <> "энач2" Then Err.Raise 1013, "another_sub", "неверные данные"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question