How to change the last number into alphabet

Hi,

In an excel ,i have one column as ID
if the id have 17 digit need to update the last digit as A.
Eg:
Input: 12345678901234567
output:1234567890123456A

Thanks.

Hi @vaish
In the regular expression, use this \d$ to define the last digit and replace it with a letter

Check this link regex101

2 Likes

Hi @vaish,

string input =β€œ12345678901234567”;
string output = input.Remove(input.Length -1,1) + β€œA”;

Regards,
Omkar P

1 Like

Hi,

Yeah its working thanks for the help.

1 Like

Hi,

Thanks for the Reply…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.