Search code examples
google-docsopenoffice-calc

How to retrieve last string of a cell delimited by a special string


How can I get Value 1 , Value 2 and Value 3 from the following rows (cells) in Google Docs?

XYZ1 --> XYZ2 --> Value 1                   
XYZ3 --> XYZ4 --> XYZ5 --> Value 2          
XYZ6 --> Value 3                            

Solution

  • Does this formula work as you want if your example values are in column A:

    =ArrayFormula(IFERROR(RIGHT(A:A,LEN(A:A)-SEARCH("|",SUBSTITUTE(A:A,"-->","|",(LEN(A:A)-LEN(SUBSTITUTE(A:A,"-->","")))/LEN("-->")))-LEN("-->"))))