Thread: Case Statement
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Case Statement

Select Case Range("A1").Value
Case "Jim", "Bill": Drk = 1
Case "Jill", "Fred": Drk = 2
...
End Select



--
Jim
"jlclyde" wrote in message
...
| Is there anyway to set up this code to use OR for a case statement or
| a way to check multiple things without putting in another case is =?
| the code below is a general idea of what I am trying to do.
|
| Thanks,
| Jay
|
| E:
| Select Case Range("A1") .value
| Case is = "Jim" or "Bill"
| Drk = 1
| Case is = "Jill" or "Fred"
| Drk = 2
| case else
| range("A`1")=Inputbox("this is not a valid name, please enter a valid
| name and press enter.")
| goto E
| End Select