Help

Re: Formula to extract email domain

6135 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Dora_Salinas
4 - Data Explorer
4 - Data Explorer

I’d like to strip the domain from the email address. It can be done with RIGHT, LEN, and FIND in Excel but I’m having trouble translating it to Airtable. Can anyone help?

9 Replies 9

[quote=“Kamille_Parks, post:2, topic:21188”]
RIGHT(), LEN() and FIND() RIGHT({Email Field},LEN({Email Field})-FIND(’@’,{Email Field}))
email domain.png

Hi Kamille! Can you let me know why I’m getting an error message when I use this formula to extract the domain name? My column containing the e-mail address is called, “e-Mail”.

FYI…my image didn’t show that I did put an “=” before the formula and it still didn’t work :slightly_smiling_face:

Duh…I think I added more than I needed to the formula, but it’s still not working. Here’s what I have now (attachment).email domain.png

Get rid of the equal sign at the beginning. Although its necessary for Excel and Sheets, you don’t put an = before a formula in Airtable.

You also have an extra } at the end of all your field names. The name of your fields should be preceded by one { and followed by one }.

Gary_Stark
5 - Automation Enthusiast
5 - Automation Enthusiast

That did it…YOU ROCK!! Also, in the interim I found this formula that worked as well…MID({e-Mail},SEARCH("@",{e-Mail})+1,255).

The 255 is just to be sure you capture long domains. THANK YOU!!

David_Meyers
5 - Automation Enthusiast
5 - Automation Enthusiast

Has anyone crafted a similar formula to extract the domain from a website URL?

LEFT(SUBSTITUTE(SUBSTITUTE({field name}, "https://", ""), "http://", ""), FIND("/", SUBSTITUTE(SUBSTITUTE({field name}, "https://", ""), "http://", ""))-1)

^ What that’s doing: remove http:// or https:// from the url, then get all the text up until the first backslash.

David_Meyers
5 - Automation Enthusiast
5 - Automation Enthusiast

Kamille: That’s fantastic. But I tried it:

LEFT(SUBSTITUTE(SUBSTITUTE({Org Website}, “https://”, “”), “http://”, “”), FIND("/", SUBSTITUTE(SUBSTITUTE({Org Website}, “https://”, “”), “http://”, “”))-1)

Airtable accepted the formula, but returns an error in each cell where the calculation runs. Any ideas?