Skip to main content

Hi I have been looking for ages but just can’t work out what I need to put. I have a url field and want to create a formula to be able to group records from where they came from say ‘airtable.com’ or ‘youtube’ as a ‘live’ way to group. So easy with filters - wish you could use ‘contain’ in formulas i would be laughing!



Thanks, Maria

You could try using this to isolate just the root URL:



LEFT(

SUBSTITUTE(

SUBSTITUTE(

{URL cell},

"http://",

""

),

"https://",

""

),

FIND(

"/",

SUBSTITUTE(

SUBSTITUTE(

{URL cell},

"http://",

""

),

"https://",

""

)

)

-1

)



This removes http(s)://, then looks for the first forward slash (ie, the end of the root domain name), and deletes anything after that.



With a URL like:


https://airtable.com/tblgM0vNFik7bg5P1/viwnGc4ETRwTXk68u?blocks=hide


this formula would return airtable.com.



With a URL like:


https://www.youtube.com/watch?v=4VR861BWkiU


this formula would return youtube.com.



With a URL like:


https://community.airtable.com/t/formula-to-pick-out-certain-words-in-an-url-field/27430


this formula would return community.airtable.com.


Hey Jeremy Thank you so!!! much - have wanting to do this for ages. Will try it out tomorrow.


Reply