i need to check whether a demical is 0 through 49.99 or 50 through 99.99 or 100 through 199.99 or greater than 200. i am trying to do this with select case, but i am not sur
Why don't you try if/then/else? They are equivalent, and I am not sure if case statement in VBasic can handle non-integers values.
Dim value As Double = 133.5
Select Case value
Case Is <= 49.99
Debug.WriteLine("first group")
Case Is <= 99.99
Debug.WriteLine("second group")
Case Is <= 199.99
Debug.WriteLine("third group")
Case Else
Debug.WriteLine("fourth group")
End Select
Where do values as 49.992 fall in your question? Since you said 0-49.99 and then 50-99.99 anything between 49.99 and 50 where does it go? In my example above it would be included in one of the options so it is values between 0 and 49.99, values between 49.99 and 99.99, etc, etc.
Dim range as Integer
range = someInteger / 50
'So, if range = 0 is 0-49.99, if it's 1 it's 50 to 99.99, etc