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.
Both approaches are explained below.
TEXTAFTER function
TheTEXTAFTER functionreturns the text that occursaftera given delimiter.
Legacy Excel
TEXTAFTER is a new function in Excel.
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 “//”.
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”.
LEN will also count characters in numbers, but number formatting is not included.
When the text is not found, FIND returns a #VALUE error.