Well, thanks for the help....but now I have this problem (sorry for the non-assembly posts) If sub(str1,x,1)="A" Z = 1 If sub(str1,x,1)="B" Z = 2 How can I consolidate this into a sub(str1,x-1,1)-> Z type things? or can i at all?