[英]How to loop through a list of values and export the outputs to a different google sheets
[英]How to write where clause in Google sheets to evaluate the values of different sheets?
讓我說有兩張名為foo
和master
的工作表。
當我在foo
的 B2 單元格中設置以下查詢時
=query('master':A1,A6, "select A where A='"&H1&"'")
foo
的 B2 單元格提取並獲取“ master
的A
”上的數據,其中“master 的A
列的單元格的值”與“ master
master
H1
的值”一致。
但是,我在這里的目標有點不同。 我想提取“ master
A
列的單元格的值”與“ foo
的H1
的值”重合的相同內容
我想我必須用一些東西替換'"&H1&"'
。 你能告訴我怎么做嗎?
這就是你的公式已經做的。
如果您希望從foo
獲取H1
假設查詢公式位於foo
您的公式是正確的:
=query('master'!A1:A6, "select A where A='"&H1&"'")
這里H1
是從foo
獲取的,因為您已將公式放入foo
。
如果要獲取master的H1
的值,那么:
=query(master!A1:A6, "select A where A='"&master!H1&"'")
如果您想將此公式放在不同的工作表中但獲取foo
的H1
,則再次引用工作表名稱:
=query(master!A1:A6, "select A where A='"&foo!H1&"'")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.