Google Sheets - Import Range within a Query

浪尽此生 提交于 2021-01-28 17:37:44

问题


Trying to run a query with an import range function built into it, but I keep getting an ERROR message. Here is the formula I am trying to use: =QUERY(IMPORTRANGE("1BJ11UiLyiK3PaS2iwHEsyuMMXomdvrEkYYj_Z7bWWw4","Sheet1!A:C"),"Select Col2 where Col1 = '"A1"' ")

I've tested the import range formula without the query and that goes through successfully so it must be something with how I am writing the query.


回答1:


You just need to add ampersands (&). Try this:

=QUERY(IMPORTRANGE("1BJ11UiLyiK3PaS2iwHEsyuMMXomdvrEkYYj_Z7bWWw4","Sheet1!A:C"),"Select Col2 where Col1 = '"&A1&"' ")

Cheers.



来源:https://stackoverflow.com/questions/54729251/google-sheets-import-range-within-a-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!