Explanation

In this example, we have a list of URLs.

The goal is to get the portion of each URL that appears after the domain name.

In the current version of Excel, the easiest way to do this is to use the TEXTAFTER function.

Excel formula: Remove protocol from URL

Both approaches are explained below.

TEXTAFTER function

TheTEXTAFTER functionreturns the text that occursaftera given delimiter.

Legacy Excel

TEXTAFTER is a new function in Excel.

Excel formula: Remove trailing slash from url

URLs begin with something called a “protocol” (i.e.

This is a “hack” to keep things simple.

This means there are only 20 characters remaining after the “//”.

Excel TEXTAFTER function

MID will just keep extracting characters until the end of the string.

The final result is “/formulas”.

For example, =MID(“apple”,2,3) returns “ppl”.

Excel MID function

LEN will also count characters in numbers, but number formatting is not included.

When the text is not found, FIND returns a #VALUE error.

Excel LEN function

Excel FIND function