Select Case syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the select-case construct and I want to select a "non-continuous"
range of account numbers, such as:

171000 to 171150
171250
171500 to 171800

and name this selection "Machinery and Equipment". Can I represent this on
one line of a "case" statement?
 
Select Case YourVariableName
Case 171000 To 171150, 171250, 171500 To 171800
'Do something if true
Case Else
'Do something if false
End Select
 
Back
Top