Thread: help with case
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
DanB DanB is offline
external usenet poster
 
Posts: 12
Default help with case

Matthew,

Case does not calculate OR type statements nor does it process multiple
cases as it falls through. Therefore, just remove the trailing ' XX ' out
of each statement and you should find that it works.

DB

"Matthew Dyer" wrote:

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?