Thread: in range
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_1056_] Simon Lloyd[_1056_] is offline
external usenet poster
 
Posts: 1
Default in range


Your case statement is done like this:
Code:
--------------------
SUB USINGCASESTATEMENT()
[/b] SELECT CASE RANGE(\"A1\").VALUE
CASE 100, 150, 200, 350, 400
RANGE(\"B1\").VALUE = RANGE(\"A1\").VALUE
CASE ELSE
RANGE(\"B1\").VALUE = 0
END SELECT
[b]END SUB
--------------------


Striker;256692 Wrote:
I have a spreadsheet with a lot of rows 50K, I need to do an action if
column the value in "N" is one of 8 to 14 numbers. Such as

If N.value = 1,2,3,4,5,6,7,14,121,122,123,124,201,202
then do something
else do nothing

There will be 10 of these statements, so maybe a case statement like

case 1,2,3,4,5,6,7,14,121,122,123,124,201,202
do something
case 151,152,153,154,155,156,157,214,215,216
do something


any suggestions?



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=71653