0
votes

I am looking to extract string after the last "/" and first "." in excel using one formula. I tried below and it works how can I combine them into one formula?

get string after last “/”

=MID(A1,FIND("=",SUBSTITUTE(A1,"/","=",LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))))+1,256)

Get string before first “.”

=MID(B1,1,FIND(".",B1)-1)

1
Substitute every instance of B1 with the whole code from the first formula, since that's what you would have been working with in the second case anyway - lolsail

1 Answers

1
votes

Try,

=REPLACE(TRIM(RIGHT(SUBSTITUTE(A1, "/", REPT(" ", LEN(A1))), LEN(A1))), FIND(".", TRIM(RIGHT(SUBSTITUTE(A1, "/", REPT(" ", LEN(A1))), LEN(A1)))), LEN(A1), "")