selection.value <> "A list of values"

  • Thread starter Thread starter ben.biddle
  • Start date Start date
B

ben.biddle

I only want my code to execute if the value of the selected cell does
not equal any of the values in a defined list of values. Instead of
constructing an If . . . Then statement that repeats "selection.value
<> value1 AND selection.value <> value2 . . ." I'm hoping someone might
tip me off on a more efficient way of writing my If . . . Then
statement. I think it would be something like "If not selection.value
in (value1, value2 . . .) then", but trial and error is a little
frustrating. Thanks.
 
Back
Top