Replacing A - E with 1 - 5

  • 17 November 2016
  • 2 replies
  • 0 views

Badge +2

Hi

I have been trying to figure out if I can use forms inline function replace() for replacing the letters A to E with the numbers 1 to 5, ie. A becomes 1, B becomes 2, etc.  I have not been able to figure this out so was wondering if anyone could help?

Thanks


2 replies

Badge +9

You can use nested replace fucntions:

replace(replace(replace(replace(replace('ABCDE','A','1'),'B','2'),'C','3'),'D','4'),'E','5')

Badge +2

Thanks Manfred, that works well.

Reply