1
1

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.

gas Query関数で疑似外部結合「INNER JOINやLEFT JOIN」を実現できる?(備忘録)

Posted at

Query関数で疑似外部結合を実現できる?

結果から言うとQuery関数には残念ながら、INNER JOINやLEFT JOINのような結合に関するオプション項目がありません。

ではどうすれば、Query関数で疑似外部結合実装できるでしょうか
実現させる方法として、VLOOKUPとARRAYFORMULA関数を組み合わせることです。

➀
=query({D2:E5,iferror(arrayformula(vlookup(F2:F5,A2:B4,2,false)))})
➁
=query({D2:E5,iferror(arrayformula(vlookup(F2:F5,A2:B4,{2,3},false)))}
➂
=query({D2:E5,iferror(arrayformula(vlookup(F2:F5,QUERY(A2:B4),{2,3},false)))})

image.png

その他いろいろ参考

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?