Explanation

In this example, the goal is to remove the protocol from a list of URLs.

To remove the protocol from a URL, we need to remove the first part of the URL.

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

Excel formula: Get domain from email address

In older versions of Excel, you could use a formula based on the MID and FIND functions.

Both options are explained below.

TEXTAFTER function

The TEXTAFTER function returns the text that occursaftera given delimiter.

Excel formula: Create email address from name

The result is the original URL without the protocol.

Want to learn more about TEXTAFTER?

Check out our guide:How to use the TEXTAFTER function.

Excel formula: Get domain name from URL

With the text “https://www.domain.com” in cell B5, FIND returns 9.

Using the LEN function like this is a shortcut, designed to simplify the formula.

LEN will return 22, which is greater than the number of characters that remain.

Excel formula: Get top level domain (TLD)

However, whennum_charsexceeds the remaining string length, MID will simply extract all remaining characters.

The final result is “www.domain.com”.

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

Excel formula: Get name from email address

For example, =RIGHT(“apple”,3) returns “ple”.

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 MID function

Excel RIGHT function

Excel LEN function

Excel FIND function