IF llFoundPrefix * found it - save the rate we found! DO CASE CASE Rate1 is Right lnResult = long_distance.rate1 CASE Rate2 is Right lnResult = long_distance.rate2 CASE Rate3 is Right lnResult = long_distance.rate3 CASE Rate4 is Right lnResult = long_distance.rate4 ENDCASE ELSE ...You are correct in your thoughts that the date is poorly designed. If you ahve any ability to change this design I would strongly recommend that do that immediately and stop trying to program around a bad data design. Over time this desing will come to bite you with some problem that cannot be programmed around. When that happens the only choice will be to redesign the data. Doiong that now will be much easier than doing it in 6 months or a year from now.