Stolen from stackoverflow
If URLs have a slash at the end of them, then use this formula to remove the final slash first
=LEFT(A16, FIND(CHAR(1), SUBSTITUTE(A16, "/", CHAR(1), LEN(A16)-LEN(SUBSTITUTE(A16, "/", ""))))-1)
Then use the formula again on the URL with the final slash removed.
