Search code examples
libreoffice-calc

Is it possible to remove characters before a certain point?


I want to delete a set of characters which are behind a backslash in LibreOffice Calc. For example:

My/Name
Is/Jeff

where I would like to delete My and Is such that only /Name and /Jeff remain.

Does Libre's inbuilt functionality allow something like this or will I need to write some sort of script?


Solution

  • Use this formula:

    =RIGHT(A1, LEN(A1) - FIND("/", A1))
    

    Breakdown:

    • RIGHT(A1): take the righthand side of the string in A1
    • LEN(A1): count the number of characters in A1
    • FIND("/", A1): get the position of slash in A1

    In other words, count all the characters and subtract the position of the slash. That's how many characters we grab starting from the right-hand side.