Showing results for 
Search instead for 
Did you mean: 

Replacing Characters In a String

Former Member
0 Kudos

I have a string field that I need to shorten - typical data looks like '123456-789 XYZ' I can get rid of the XYZ as it is always in the 18,19,20th positions in the string. I need to shorten the field to '123456' but the dash isn't always in the same spot. Can I use the REPLACE function to get rid of everything after the "-"?

Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

Hi Layne,

Use this formula:


//This will get rid of the 'XYZ' as well

Hope this helps!


Former Member
0 Kudos

That did the trick!


Answers (0)