Select Case
Try this:
Function range(incw) As String
Select Case incw
Case 0
range = "None"
Case incw 0 And incw <= 5
range = "Moderate"
Case Is 5
range = "Extreme"
End Select
End Function
HTH,
JP
On Jan 22, 12:47*pm, wrote:
Hi,
I am having some trouble with Select Case. *I have a bunch of ifelse
statements that would be run faster as a select case, but i cant get
the syntax. *I want something like:
Function range(incw) as string
*Select Case incw
* * * Case is 0
* * * * * * * * range="None"
* * * Case is 0 And <=5 * * * * * ' This is the part im having
trouble with
* * * * * * * * range="Moderate"
* * * Case is 5
* * * * * * * * range="Extreme"
*End Select
*End Function
Thanks
|