View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] ben.biddle@gmail.com is offline
external usenet poster
 
Posts: 5
Default selection.value < "A list of values"

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.