Thread
:
help with case
View Single Post
#
5
Posted to microsoft.public.excel.programming
DanB
external usenet poster
Posts: 12
help with case
Matthew,
Don G's answer is the most correct. I totally forgot that you can test for
ranges.
DB
"Don Guillett" wrote:
Sub selecttry()
Dim x As Integer
Select Case Val(InputBox("num"))
Case 1 To 5: x = 1
Case 6 To 10: x = 2
Case Else
End Select
MsgBox x
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Matthew Dyer" wrote in message
...
Here's what I've got:
Select Case Maxdpd
Case Is <= 39
dpdval = R15
Case Is <= 59 39
dpdval = R2
Case Is <= 89 59
dpdval = R3
Case Is 89
dpdval = R4
End Select
As you can probably guess, this is not working. dpdval is returning 0
for every case except the <= 39. How do i fix this?
Reply With Quote
DanB
View Public Profile
Find all posts by DanB