If the end character is always 'A' then newvar=compress(upcase(oldvar),'A')
if it's a mixture of Alphabets then newvar=compress(oldvar,,'A')
Akshaya