LoginSignup
32
25

More than 5 years have passed since last update.

queryをimportrangeを使って別スプレッドシートのデータをフィルタリングする - GoogleSpreadSheet

Posted at
A B
こそだて 1
kosodate 2

同じスプレッドシート内のquery

同じスプレッドシートの場合、selectには列のアルファベットを指定します

=query("シート名!A2:B","select A, B where A = 'こそだて'")

別のスプレッドシート内のquery

別のスプレッドシートの場合は、importrangeを使ってデータを読み込み、selectにはCol1, Col2などの値を指定します

=query(importrange("スプレッドシートのid", "シート名!A2:B"), "select Col1, Col2 where Col1 = 'こそだて'")

おまけ

スプレッドシートのid

https://docs.google.com/.../spreadsheets/d/スプレッドシートのid/edit
32
25
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
32
25