Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
selection.value < "A list of values"
Look at the Match function in the help.
RBS wrote in message oups.com... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Center across selection" rather than "Merge cells" | Excel Discussion (Misc queries) | |||
Truncated font list in Excel's "Insert Symbol" menu selection | Excel Discussion (Misc queries) | |||
Icon for "Wrap" and for "Centre Across Selection" | Excel Worksheet Functions | |||
Changing "returned" values from "0" to "blank" | Excel Worksheet Functions |