Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Conditional Formatting New Rule with Formulas in Excel
  • How to calculate average last N values in a table in Excel
  • What-If Analysis: Scenarios and Goal Seek in Excel
  • How to add Trendline to a chart in Excel
  • How to Sort by Color in Excel

References

  • How to get first row number in range in Excel
  • How to get address of first cell in range in Excel
  • Create hyperlink with VLOOKUP in Excel
  • How to use Excel MMULT Function
  • Extract data with helper column in Excel

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation number multiple 100
  • Excel Data validation must contain specific text
  • Excel Data validation allow weekday only
  • Excel Data validation must not contain

How to extract domain name from URL in Excel

by

If you want to extract the domain name from a complete URL, you can do so with a formula that uses  the LEFT and FIND functions. See example: In the formula below, url is the the URL you are working with.

Formula

=LEFT(url,FIND("/",url,9))

Explanation

In the example, we are using this formula:

=LEFT(B4,FIND("/",B4,9))

Here’s how the formula works:

B4 contains the URL: “ https://www.xlsoffice.com/data-analysis/excel-pie-chart/”

At the core, this formula is extracting characters from the URL, starting from the left, and using the FIND function to figure out how many characters to extract.

First, FIND locates the “/” character in the URL, starting at the 9th character. This is the “clever” part of the formula. URLs begin with something called a “protocol” which looks like this:

ftp://
sftp://
http://
https://

and so on. By starting at the 9th character, the protocol is skipped, and the FIND function will return the location of the 3rd instance of “/” (the first instance after the double slash in the protocol).

In this case, the third instance of “/” is the 21st character in the URL, so FIND returns the number 21.

The LEFT function then extracts 21 characters from the URL, starting at the left. The result is the domain name with a trailing slash.

If you want to get the domain name without a trailing slash, just subtract the number 1 from the the result of FIND like so:

=LEFT(B4,FIND("/",B4,9)-1)

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Complete List of Excel Logical Functions, References and Examples
  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • Not Equal To ‘<>‘ operator in Excel
  • How to return blank in place of #DIV/0! error in Excel
  • Invoice status with nested if in Excel

Date Time

  • Calculate series of dates by workdays in Excel
  • Add business days to date in Excel
  • Find Last Day of the Month in Excel
  • Display Date is same month in Excel
  • How to enter Today’s Date or Static Date and Time in Excel

Grouping

  • If cell contains one of many things in Excel
  • Categorize text with keywords in Excel
  • Map inputs to arbitrary values in Excel
  • Group times into 3 hour buckets in Excel
  • Group times into unequal buckets in Excel

General

  • List sheet names with formula in Excel
  • Spell Check in Excel
  • Subtotal invoices by age in Excel
  • How to make excel worksheets print on one page?
  • AutoRecover file that was never saved in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning