I haven't tried this yet, but my reading of the manual says I should be able to do something like-----

select case X 'X is the name of a/d variable

case 0<X<20
go do something
case 21<X<40 'or should this be IS >21 AND IS < 40
go do something different
case 41<X<60
go do something different still

etc, etc.
Does anyone reckon this will work?

Just thinking out loud,
Peter Moritz.