Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Center across selection" rather than "Merge cells" Elardus Excel Discussion (Misc queries) 10 November 6th 08 02:28 PM
Truncated font list in Excel's "Insert Symbol" menu selection OCM Excel Discussion (Misc queries) 1 February 13th 06 03:49 AM
Icon for "Wrap" and for "Centre Across Selection" BeSmart Excel Worksheet Functions 2 November 16th 05 06:44 PM
Changing "returned" values from "0" to "blank" LATATC Excel Worksheet Functions 2 October 20th 05 04:41 PM


All times are GMT +1. The time now is 05:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"