Convert last number in a cell to a letter in another cell using 2 arguments

If the last character in a cell = “1” Then convert that character in a new cell to “A” and if the last character in a cell = “3” Then convert that character in a new cell to “C”.
i.e.
Cell A1 – MIARD01N01
Cell A2 – MIARD01N0A
And
Cell A1 – MIARD01N03
Cell A2 – MIARD01N0C

Thanks

I used the following formula for one case but i need to incorporate an If Then for the second argument.

=REPLACE(A1,10,1,A)

  • =LEFT(A1,LEN(A1)-1)&CHAR(64+RIGHT(A1,1))

    – 

  • 1

    Or, =REPLACE(A1,LEN(A1),1,CHAR(64+RIGHT(A1)))

    – 

  • These work but I need 2 if then arguments. If last char = “1” then “A” or if last char = “3” then “C”

    – 

  • Whoops! never mind That works!!! Thanks so much!

    – 

  • 1

    To do so, you would just need to change the 64 to 65

    – 




Certainly, it works with your existing formula, just replace 10 & A with LEN(A1) & CHAR(64+RIGHT(A1)), that said the formula will be:

enter image description here


• Formula used in cell A2

=REPLACE(A1,LEN(A1),1,CHAR(64+RIGHT(A1)))

Leave a Comment