examine every character with a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field that stores policy number like so:

PL1951556F
PL199523J

I am needing to add the next letter upon renewal to the new policy number
would look like this:

PL1951556G
PL199523H

I know how to extract part of text based on =Right(PolicyNo],1) but in this
case the letter is not always in the same position and I'm not sure how to
tell the program to extract the last letter regardless on what position it is
in. Does anyone have any suggestions.
 
I am needing to add the next letter upon renewal to the new policy
number would look like this:

PL1951556F -> PL1951556G
PL199523H -> PL199523J

newString = Left(oldString, Len(oldString)-1) & _
Chr$(Asc(Right(oldString,1))+1)



Tim F
 
Back
Top