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_Array Formulas_Google Sheets Query - Fatal编程技术网

Google sheets 填写谷歌表格查询栏

Google sheets 填写谷歌表格查询栏,google-sheets,array-formulas,google-sheets-query,Google Sheets,Array Formulas,Google Sheets Query,如何在不拖动的情况下向下填充此查询 =SUM( 质疑( { “报告:材料清单”!B9:B, “报告:材料清单”!C9:C, “报告:材料清单”!D9:D, “报告:材料清单”!E9:E, “报告:物料清单”!F9:F, “报告:材料清单”!G9:G, “报告:材料清单”!H9:H, “报告:材料清单”!I9:I }, “选择Col4*Col6,其中Col1='”&A3&“和Col2='”&B3&“,并且Col1不是空标签Col4*Col6''格式Col4*Col6'$#'”,0 ) ) 查询在

如何在不拖动的情况下向下填充此
查询

=SUM(
质疑(
{
“报告:材料清单”!B9:B,
“报告:材料清单”!C9:C,
“报告:材料清单”!D9:D,
“报告:材料清单”!E9:E,
“报告:物料清单”!F9:F,
“报告:材料清单”!G9:G,
“报告:材料清单”!H9:H,
“报告:材料清单”!I9:I
},
“选择Col4*Col6,其中Col1='”&A3&“和Col2='”&B3&“,并且Col1不是空标签Col4*Col6''格式Col4*Col6'$#'”,0
)
)
查询在J3中,考虑到A3:A和B3:B中的唯一值,我希望它适用于J3:J


用这个公式,你可以得到全部

=ArrayFormula(query({'Report: Materials List'!B9:C, 'Report: Materials List'!E9:E * 'Report: Materials List'!G9:G}, "Select Col1, Col2, sum(Col3) where Col1 <>'' group by Col1, Col2 label sum(Col3) '' format sum(Col3) '$00'"))
=ArrayFormula(查询({'Report:Materials List'!B9:C,'Report:Materials List'!E9:E*'Report:Materials List'!G9:G},“选择Col1,Col2,sum(Col3),其中Col1'按Col1分组,Col2标签sum(Col3)'格式sum(Col3)'$00'))
(见单元N3)

如果只想返回第二列,可以添加一个vlookup来匹配a列和B列中的值

=ArrayFormula(if(len(A3:A&B3:B), vlookup(A3:A&B3:B, query({'Report: Materials List'!B9:B&'Report: Materials List'!C9:C, 'Report: Materials List'!E9:E * 'Report: Materials List'!G9:G},"Select Col1, sum(Col2) where Col1 <>'' group by Col1 label sum(Col2) ''"), 2, 0),))
=ArrayFormula(if(len(A3:A&B3:B),vlookup(A3:A&B3:B,查询({'Report:Materials List'!B9:B&'Report:Materials List'!C9:C,'Report:Materials List'!E9:E*'Report:Materials List'!G9:G}),选择Col1,求和(Col2),其中Col1'按Col1标签和(Col2)'、2、0)分组)

使用这个公式,您可以获得全部

=ArrayFormula(query({'Report: Materials List'!B9:C, 'Report: Materials List'!E9:E * 'Report: Materials List'!G9:G}, "Select Col1, Col2, sum(Col3) where Col1 <>'' group by Col1, Col2 label sum(Col3) '' format sum(Col3) '$00'"))
=ArrayFormula(查询({'Report:Materials List'!B9:C,'Report:Materials List'!E9:E*'Report:Materials List'!G9:G},“选择Col1,Col2,sum(Col3),其中Col1'按Col1分组,Col2标签sum(Col3)'格式sum(Col3)'$00'))
(见单元N3)

如果只想返回第二列,可以添加一个vlookup来匹配a列和B列中的值

=ArrayFormula(if(len(A3:A&B3:B), vlookup(A3:A&B3:B, query({'Report: Materials List'!B9:B&'Report: Materials List'!C9:C, 'Report: Materials List'!E9:E * 'Report: Materials List'!G9:G},"Select Col1, sum(Col2) where Col1 <>'' group by Col1 label sum(Col2) ''"), 2, 0),))
=ArrayFormula(if(len(A3:A&B3:B),vlookup(A3:A&B3:B,查询({'Report:Materials List'!B9:B&'Report:Materials List'!C9:C,'Report:Materials List'!E9:E*'Report:Materials List'!G9:G}),选择Col1,求和(Col2),其中Col1'按Col1标签和(Col2)'、2、0)分组)

非常感谢您的回答,JPV!它确实工作得很好,但我最终将用不同的公式/数据填充B和J之间的列。这就是为什么它们之间有空格。使用第二个公式更新了答案,该公式仅检索第二列,基于a和B中串联值的vlookup。非常感谢您的答案,JPV!它确实工作得很好,但我最终将用不同的公式/数据填充B和J之间的列。这就是为什么它们之间有空格。使用第二个公式更新了答案,该公式仅检索第二列,基于a和B中连接值的vlookup。