then you ought to use a reference table that you can loop through in my opinion. select case will be just as untidy as if..elseif