See if this does it for you: =TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),3*LEN(A1)+1,LEN(A1)))
This is assuming A1
is where the string is. The 3
in 3*LEN(A1)
is what determines which string will be extracted, like so:
0 -> 1234
1 -> AB
2 -> 001
3 -> 4"
4 -> X01
Source: https://stackoverflow.com/questions/61837696/excel-extract-substrings-from-string-using-filterxml