I'm a Parole Supervisor and each month we have a docket of inmates to see the Parole Board. I have three Parole Agents preparing the cases for each month. They are assigned cases based of the inmate's number. Each inmate number starts with two letters and ends with four numbers (NU3644). Mandy is assigned cases based on the inmate number that ends in 1, 2, or 3. Matt is assigned cases based on the inmate number that ends in 4, 5, or 6, and Donna is assigned cases based on the inmate number that ends in 7, 8 or 9. However, many inmate numbers end in zero. In that instance it goes by the preceding number until a positive integer is located. For instance MS3000 would be Mandy's case, and NU3050 would be Matt's case.
I need a formula that would yield the agent's name based off the last digit or in the case of zero the preceding digit(s) of the inmate number.
I need a formula that would yield the agent's name based off the last digit or in the case of zero the preceding digit(s) of the inmate number.