Book1 | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | PB-JK-25-4200145 | 4200145 | Newe ver of Excel with TEXTAFTER function | ||
2 | 4200145 | Should work with older ver. of Excel | |||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1 | B1 | =TEXTAFTER(A1,"-",-1) |
B2 | B2 | =TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),LEN(A1))) |
.. or if it is always the same number of characters after the last hyphen, you could also use thisIf it's always the same number of characters before the last hyphen,