1

I am using google sheets and I am having a list of subdomains:

app.example.com
appserver.example.com
bigstone.example.com
cpanel.example.com
cpanel.example3.com
cpanel.example4.com
cpanel.example2.com
cpanel.example2.com

I would like to get:

example.com
example2.com
example3.com
example4.com

Find below my example sheet:

Google Sheet Example

I tried =left(F2, find(".", F2,2)), however I only get .app etc.

Any suggestions what I am doing wrong?

Carol.Kar
  • 4,581
  • 36
  • 131
  • 264

2 Answers2

2

You were on the right path, but it's better to search from the other side:

=RIGHT(A1, len(A1) - find(".", A1))

It basically searches from the right between the length of the cell and the first . it finds

nabais
  • 1,981
  • 1
  • 12
  • 18
2

Maybe this will work for you in cell E2:

=ARRAYFORMULA(UNIQUE(IFERROR(MID(A2:A,FIND(".",A2:A)+1,100))))

MattKing
  • 7,373
  • 8
  • 13