Fetch last digits of column data to another column in excel

Hi Everyone…I have a column which contains data as “NM01010363_b2b_12”. now i need to take last two digits i.e: “12” and paste into another column…
Please help me out…

Thank you…

there are two method i remember right now:

  1. Right(“Your String”,2)

  2. “Your String”.Substring(“Your String”.Length-2)

2 Likes

Hi @saikumar :wave:

Since some rows are of different type like NM01406534, you can use an if condition to check if the row("Custom Label") contains an underscore and if it does, split it based on the “_” and take the last value from the temp array.

Let me know if you are facing any issues!

Cheers!

1 Like