In this article we will show how to extract a domain name from an email address in google sheets in just a few simple steps using REGEXEXTRACT. Simply follow the steps below:
For our example, we have two columns: Column A for the name and Column B for the email.
The cells containing the emails in Column B start at B2. We then set Column C as the column for the domains that we want to extract from the emails in Column B.
The formula that we will use to extract the domain from the emails is the following:
=REGEXEXTRACT(cell, "@(.+)")
Where you replace cell with the reference to the cell containing the email. In our example we will change “cell” to B2 in the formula.
=REGEXEXTRACT(B2, "@(.+)")
You will now see the domain extracted from the email!
In order to extract the domain from all of the emails in the column there are two methods you can follow:
Click on the cell and double-click the round blue dot to autofill the column with the formula.
Click on the cell and Click-drag the round blue dot in the lower-right corner of the cell.
Either way, the results will be the same:
You have now successfully extracted a domain from an email in Google Sheets!
Attach a Google Sheet to an Email