S
S
svi4112022-02-01 09:11:15
excel
svi411, 2022-02-01 09:11:15

How to sort domains?

For example, there is an xls file with a list of domains and subdomains. It is necessary:
​​1.Remove domains 2.Leave
only the main part of the domain from subdomains. It was 123.domain.com, you need to leave only domain.com
3. Remove duplicates from the received domains
What services can be used to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Yurchenkov, 2022-02-01
@EPIDEMIASH

I don't see anything difficult
ПРАВСИМВ(A1;ДЛСТР(A1)-ПОИСК(".";A1))
Considering that you will still have addresses without a 2nd level domain, write an additional condition in the formula, otherwise you will get .com .ru, etc.
A1 is the initial value cell. Duplicates by standard means: select the column Data -> Delete Duplicates.
UPD
Here, take a piece of the formula, just run it several times for the desired result, otherwise I'm already confused there.

=ЕСЛИОШИБКА(ЕСЛИ(ПОИСК("."; ПРАВСИМВ(A2;ДЛСТР(A2)-ПОИСК(".";ПРАВСИМВ(A2;ДЛСТР(A2)-ПОИСК(".";A2;1));1));1);ПРАВСИМВ(A2;ДЛСТР(A2)-ПОИСК(".";A2;1));A2);A2)

First you run it, the result will be in column B, then you run column B and output it to C.
61f8eb4e48066033612228.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question