EzGoingKev
Registered User.
- Local time
- Today, 08:21
- Joined
- Nov 8, 2019
- Messages
- 199
I have some data in a table that is listed like this:
NTC10RM
NTC5RM
TC10RM
TC5RM
I need them to be like this:
NTC-10-RM
NTC-5-RM
TC-10-RM
TC-5-RM
For the NTC/TC part I used LEFT([FieldName], InStr([FieldName], "C")) & "-". For the RM part I know I could use some like RIGHT([FieldName],2).
The part that I do not know how to handle is the numeric part because some have one number and some have two.
I am looking to write something like : Formatted : LEFT([FieldName], InStr([FieldName], "C")) & "-" & <part I need help with> & "-" & RIGHT([FieldName],2)
NTC10RM
NTC5RM
TC10RM
TC5RM
I need them to be like this:
NTC-10-RM
NTC-5-RM
TC-10-RM
TC-5-RM
For the NTC/TC part I used LEFT([FieldName], InStr([FieldName], "C")) & "-". For the RM part I know I could use some like RIGHT([FieldName],2).
The part that I do not know how to handle is the numeric part because some have one number and some have two.
I am looking to write something like : Formatted : LEFT([FieldName], InStr([FieldName], "C")) & "-" & <part I need help with> & "-" & RIGHT([FieldName],2)