MechEngSk1
New Member
- Joined
- Jan 2, 2013
- Messages
- 10
Hi All,
I have been searching everywhere, but nothing came up.
I have long list of data (asett IDs). All of it is in the following format.
AA-BB-CC-CC001
The number of dash occurences can vary based on the level the asett is located in.
I need to extract the parrent of the asett to adjacent column. the parrent for the above example would be:
AA-BB-CC
The parrent is the values before the last "-". There can be as many as 10 "-"s and as little as 1 in the asett ID.
I have been looking at the split and trim functions in excel but I have not been able to define split/trim by last "-".
Could you please assist me in sorting this out? Preferably a macro as I will have to do this number of times in the future. Other methods to trim/split are ok as well.
I have been searching everywhere, but nothing came up.
I have long list of data (asett IDs). All of it is in the following format.
AA-BB-CC-CC001
The number of dash occurences can vary based on the level the asett is located in.
I need to extract the parrent of the asett to adjacent column. the parrent for the above example would be:
AA-BB-CC
The parrent is the values before the last "-". There can be as many as 10 "-"s and as little as 1 in the asett ID.
I have been looking at the split and trim functions in excel but I have not been able to define split/trim by last "-".
Could you please assist me in sorting this out? Preferably a macro as I will have to do this number of times in the future. Other methods to trim/split are ok as well.