1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Webサイトのドメインを抽出する数式

Last updated at Posted at 2022-02-14

Answersで回答する時に使う情報のまとめ

たまに、同じような質問があるので、いい回答があったらまとめておきたいと思います。

IF(CONTAINS(Website,"www."),
LEFT(SUBSTITUTE(Website, LEFT(Website, FIND(".", Website)), NULL),
IF(CONTAINS(
SUBSTITUTE(Website, LEFT(Website, FIND(".", Website)), NULL),"/"),
FIND("/",SUBSTITUTE(Website, LEFT(Website, FIND(".", Website)), NULL))-1,255)),
IF(AND(NOT(CONTAINS(Website,"www.")),BEGINS(Website,"http")),
MID(Website,FIND(":", Website)+3, FIND("/", SUBSTITUTE(Website,"//","$$"))-FIND(":", Website)-3),

LEFT(Website,
IF(CONTAINS(Website,"/"),FIND("/",Website)-1,255))))

Formula to Extract domain from Website

アドレスに特定のドメインが含まれているかの確認

ポイントはCONTAINSで比較する時には完全一致でしか判定してない。
そのため、フォーマットを変換する必要あある。

IF(CONTAINS("@gmail:@yahoo:@aol:@hotmail:@msn:@wanadoo:@comcast:@live:@outlook", SUBSTITUTE( SUBSTITUTE( email, left(email ,FIND('@', email )-1) , ""),".com","") ),"Personal","Corporate")

@gamil などを切り出す処理は以下

SUBSTITUTE( SUBSTITUTE( email, left(email ,FIND('@', email )-1) , ""),".com","")

Contains formula help

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?