i@m.fm

Frank Michlick's blog

Entries Comments



Month: December, 2011

Extract the TLD from a Domain in a Spreadsheet

6 December, 2011 (00:29) | Work | By: Frank Michlick

Time to activate this blog again, no? For our domain name sales reports over at DNN I needed a spreadsheet function that separates the TLD from a domain name. I’m using OpenOffice and am planning on switching to LibreOffice, but I think this should work in Excel as well.

So if the cell that contains the domain name is “A1″, this is my formula:

=RIGHT(A1;(LEN(A1)-SEARCH(“\.”;A1)))

The search statement determines the location of the first Dot counting from the left. This number is then deducted from the total length of the text in A1 and then separated from the rest of the string by using the “RIGHT” function.