I have an excel column with strings like this one: ABC-1234-GLK-1234-10TH8E10-21 71-D I need to give to a variable the value GL-1234 (the substring between the 2nd dash and the 4th). I tried
x=Mid(string, 10, 8)
but the problem is that not all the strings have the same length, however the only constant is that the substring that i want is between the 2nd and the 4th dash.
Any ideas?