Extract URL Before Question Mark In Excel

If we see the structure of URL we see that along with the domain name there are some other metrics associated in it.To do some analysis e.g. get the domain name from the URL, we have to extract it just before the question mark in excel.

Let’s see how we could extract the URL part before the question mark “?” character in excel.

We will see a simple formula to extract the URL using some text functions in excel.

Below is the data which has the entire URL of a given page and we are interested in extracting only the URL part before the question mark as shown in column B.


Enter the formula below in cell B2



Now drag the formula till where your data is available in column A.


Hope this helped.

Share The Knowledge

Random Posts

Leave a Reply