Trim 1st 2 digits in data set?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a column of data where I need to remove the 1st 2 digits & keep the rest. The whole string contains both letters and numbers. For example, in my column I have 07M123456789 & 780001234RB, etc... and I need to return M123456789 & 0001234RB.
I've tried trim, trimright, & trimleft but these are not working because the length of my data varies. Any suggestions or help would be greatly
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Substring([field],2,)
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @kvoelker
I bet you were so close when you were using those formulas. Here is what I would suggest:
right([Field1],Length([Field1])-2)
This says keep the right portion of your string with a length of your original string minus two characters.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Kenda I appreciate and respect your diligence in using the actual string length. I have a habit of over or under trimming by 1 so I end up doing lazy stuff like this more often than I'd care to admit:
Trim(SubString([Field1],2,999))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
