Search code examples
stringexcelsearchexcel-formulaworksheet-function

How to read characters from the right until a slash is reached


I have a column ("E") containing numbers in this format:

879/13
879/2
879/6

I want to split the numbers into two columns. I solved the left side, but the right side is giving me troubles, more specifically numbers with only a single digit after the slash, as they return /Number. How do I fix this?

My formulas:

=IF(ISERROR(LEFT(E2;SEARCH("/";E2)-1));E2;LEFT(E2;SEARCH("/";E2)-1))

=IF(ISERROR(RIGHT(E2;SEARCH("/";E2)-1));E2;RIGHT(E2;SEARCH("/";E2)-2))

Solution

  • Seems Text to Columns with / as delimiter might be more suitable but you might try:

    =IFERROR(MID(E2;FIND("/";E2)+1;LEN(E2));"")