selection.value <> "A list of values"

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top