The last four characters of string

Dear all,

I need to get the last four characters of few excel lines. They all have different length, but I just do need the last four. How can I do it with substring method?

Many thanks :slight_smile:
Angel

Hi,
use:

new_text = text.Substring(text.Length - 4)

Many thanks!

1 Like

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