excel find last occurrence of character in string code example
Example 1: excel formula find 2nd occurrence in string
To find the 2nd backslash in the text in cell A1:
=SEARCH("^", SUBSTITUTE(A1, "\","^",2))
To find the 4th period in the text in cell A1:
=SEARCH("^", SUBSTITUTE(A1, ".","^",4))
Example 2: ms excel find last character in a cell
=RIGHT(A2,LEN(A2)-FIND("@",SUBSTITUTE(A2,"/","@",LEN(A2)-LEN(SUBSTITUTE(A2,"/",""))),1))