2,892 questions
Try specifying the smaller value first:
. . .
Case -4 To -2
lCol = "CM5"
Case -9 To -5
lCol = "CM10"
. . .
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hallo,
I am having trouble getting select case to work
Select Case T
Case > 1
lCol = "CP10"
Case 0
lCol = "CP0"
Case -2 To -4
lCol ="CM5"
Case -5 To -9
lCol = "CM10"
Case -10 To -19
lCol = "CM20"
Case -20 To -49
lCol = "CM40"
Case < -50
lCol = "CM50"
End Select
If T is "-2" or negative it gives lCol is nothing error. What is wrong?
Thanks
Try specifying the smaller value first:
. . .
Case -4 To -2
lCol = "CM5"
Case -9 To -5
lCol = "CM10"
. . .
thanks Viorel-1 it worked.