Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 通过比较某些值从其他电子表格获取数据_Google Sheets_Google Sheets Formula_Google Sheets Query_Importrange - Fatal编程技术网

Google sheets 通过比较某些值从其他电子表格获取数据

Google sheets 通过比较某些值从其他电子表格获取数据,google-sheets,google-sheets-formula,google-sheets-query,importrange,Google Sheets,Google Sheets Formula,Google Sheets Query,Importrange,我有一个示例电子表格,例如 我想将数据从这个电子表格导入到另一个电子表格,但是在比较了一些数据之后,比如 第二幅图像中所选单元格的My noob公式name: =Query(ImportRange("URL of first spreadsheet","sheet!B:D"),"Select Col2 where Col2=A.....(what to add here? this column 'A' is not working for

我有一个示例电子表格,例如

我想将数据从这个电子表格导入到另一个电子表格,但是在比较了一些数据之后,比如

第二幅图像中所选单元格的My noob公式
name

=Query(ImportRange("URL of first spreadsheet","sheet!B:D"),"Select Col2 where Col2=A.....(what to add here? this column 'A' is not working for comparing the names)
我的方法:

=Query(ImportRange("URL of first spreadsheet","sheet!B:D"),"Select Col2 where Col2=A.....(what to add here? this column 'A' is not working for comparing the names)
我将比较导入范围中的值与现有列,即previousSpreadsheet.name.A=thisSpreadsheet.this_name.A,并比较每个名称和
相应地为接下来的三列选择
值(黄色)。我希望我明白了

我应该在这里添加什么?我的方法正确吗?如果没有,有什么替代方案来实现这一点? 谢谢。

编辑 (在OP之后)

另外,我能用一匹比较两匹吗?例如
LOWER(Col2)='“&LOWER(A2)&”或“&F2&”
Col2=A2 | | F2
类似的地方?用来比较两个col和一个col

如果您使用多个名称作为变量,您可能需要考虑使用其他选项,例如“代码>匹配< <代码>


原始答案

请使用

=Query(ImportRange("URL of first spreadsheet","sheet!B:D"),"Select Col2 where Col2='"&A2&"'")
(其中,
A2
是您需要的名称)

请注意引用单元格的语法:单引号
双引号
符号
&
单元格
A2
,再次
&“

中间没有空格

请尝试:

=ARRAYFORMULA(IFNA(VLOOKUP(A2:A, IMPORTRANGE("ID", "sheet!B:D"), {1,2,3}, 0)))

查询带来了前一个电子表格的第一个名称(此),所需的匹配值打印在第二列上。为什么?i、 e.
[第1行:“这个”,第2行:“A”]
。这不应该只得到“A”吗?不管标题是什么导致了问题。谢谢,你想出来了。很高兴我能帮忙。:)还有一件事。我可以将此设置为不区分大小写吗?i、 e.我是否可以将“a”与“a”进行比较,并将“a”作为输出?“我是否可以使其不区分大小写?”。只要在需要的地方使用
LOWER
UPPER
功能组合即可。e、 g.
=查询(导入(“第一个电子表格的URL”,“工作表!B:D”),“选择列2,其中较低的列(列2)='”和较低的列(列2)和“”)