Formula Library

Excel Formula To Extract Tld Co.Uk From Domain In Analytics Event Text

Extract top-level domain values from URLs in analytics event text with a ready-to-use formula for Excel, Google Sheets, and WPS.

Quick answer

Extract tld co.uk from domain in analytics event text.

Unified formula

ExcelWPS
=LET(host,TEXTBEFORE(TEXTAFTER(A2,"//"),"/"), TEXTAFTER(host, ".", -1))
View platform differences

Google Sheets

=IFERROR(REGEXEXTRACT(A2, "\.([A-Za-z]{2,})(?:/|\?|#|$)"), "")

How it works

Need a custom version?

Related formulas