Skip to main content

Formula to extract email domain

  • January 14, 2019
  • 9 replies
  • 175 views

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

Kamille_Parks11
Forum|alt.badge.img+27

Forum|alt.badge.img
  • Participating Frequently
  • September 20, 2019

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

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”.


Forum|alt.badge.img
  • Participating Frequently
  • September 20, 2019

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


Forum|alt.badge.img
  • Participating Frequently
  • September 20, 2019

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).


Kamille_Parks11
Forum|alt.badge.img+27

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).


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 }.


Forum|alt.badge.img
  • Participating Frequently
  • September 20, 2019

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!!


Forum|alt.badge.img+2
  • Participating Frequently
  • September 2, 2020

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


Kamille_Parks11
Forum|alt.badge.img+27

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.


Forum|alt.badge.img+2
  • Participating Frequently
  • September 2, 2020

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?