MrExcel Publishing
Your One Stop for Excel Tips & Solutions

how to set two conditions for each select case


Posted by arpan on February 13, 2001 2:24 PM

hello, i need help to set two conditions for each select case
example:
Sub CopyIt()
month = Sheets("totI").Range("e1").Value
BIS = Sheets("Year-1").Range("i1").Value
Select Case month
case is = "1"
Sheets("totI").Range("A9:a38").Value = Sheets_("Year").Range("b3:b33").Value
If BIS = "true" Then
Sheets("totI").Range("g8:g38").Value = Sheets("Year-1").Range("d3:b33").Value
Else
Sheets("totI").Range("g7:g37").Value = Sheets("Year-1").Range("d3:b33").Value
End If
case is "etc..


thanks!


Posted by Dave Hawley on February 13, 2001 11:07 PM


Hi arpan

you can set two conditions for a Case by seperating each with a comma like:

Case 1,2,3,4,5


Or in this case you would be better using

Case 1 to 5

Dave

Posted by Dave Hawley on February 13, 2001 11:07 PM


Hi arpan

you can set two conditions for a Case by seperating each with a comma like:

Case 1,2,3,4,5


Or in this case you would be better using

Case 1 to 5

DaveOzGrid Business Applications

Posted by arpan on February 15, 2001 2:23 PM


THANK YOU very much, Dave, it works perfectly!