I'm not sure how to title this question.
I have a complicated challenge that I'm not sure how to approach in excel.
I have a column with long variable length strings, example
c68d7a51-5cef-4a5c-b417-b2751fe9754b
c68d7a51-5cef-4a5c-b417-b2751fe9754b-0
c68d7a51-5cef-4a5c-b417-b2751fe9754b-1
09573f-1780c84f-e5ff-85821a-6236e0399d
09573f-1780c84f-e5ff-85821a-6236e0399d-10
09573f-1780c84f-e5ff-85821a-6236e0399d-123
Where for the ones that end in a "-***" I need to have a new column which returns the string without that ending RIGHT substring else null. The ending substring is anywhere from 1 to 3 characters long after the "-" specific character. I also need to note based on the comments, that I can't work from the left because the strings change in length and in "-" placement. The only constant is that some of these strings have child substring values from 1 to 3 digitals after the last "-".
What I have so far for an outline looks like this
=IF(RIGHT(A1,4) contains "-", RIGHT(A1, LEN(A1) - number_of_chars_to_remove), else null.
If you don't mind, how do I go about accomplishing this?
I appreciate your help, thank you!
-
then the-
you want to remove?