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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/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
If statement 从多个动态下拉列表中进行Google工作表匹配/查询_If Statement_Google Sheets_Google Sheets Formula_Array Formulas_Google Sheets Query - Fatal编程技术网

If statement 从多个动态下拉列表中进行Google工作表匹配/查询

If statement 从多个动态下拉列表中进行Google工作表匹配/查询,if-statement,google-sheets,google-sheets-formula,array-formulas,google-sheets-query,If Statement,Google Sheets,Google Sheets Formula,Array Formulas,Google Sheets Query,我有一张工作表,我需要从另一个选项卡查询数据,以匹配4个if/或动态下拉列表和1个if/和动态下拉列表。对我来说,这是个难缠的问题。我附上了这张表以及一个4分钟的解释视频。提前谢谢 工作表: 视频: 试试: =ARRAY_CONSTRAIN(QUERY({'Sub List'!A2:AE, TRANSPOSE(QUERY(TRANSPOSE('Sub List'!L2:U),,999^99)), TRANSPOSE(QUERY(TRANSPOSE('Sub List'!V2:AE),,

我有一张工作表,我需要从另一个选项卡查询数据,以匹配4个if/或动态下拉列表和1个if/和动态下拉列表。对我来说,这是个难缠的问题。我附上了这张表以及一个4分钟的解释视频。提前谢谢

工作表:

视频:

试试:

=ARRAY_CONSTRAIN(QUERY({'Sub List'!A2:AE, 
 TRANSPOSE(QUERY(TRANSPOSE('Sub List'!L2:U),,999^99)), 
 TRANSPOSE(QUERY(TRANSPOSE('Sub List'!V2:AE),,999^99))},
 "where "&TEXTJOIN(" and ", 1, 
 IF(B1="",,"Col32 contains '"&B1&"'"), 
 IF(B2="",,"Col32 contains '"&B2&"'"), 
 IF(B3="",,"Col32 contains '"&B3&"'"), 
 IF(B4="",,"Col32 contains '"&B4&"'"), 
 IF(B6="",,"Col33 contains '"&B6&"'"))&""), 999^99, 31)


对于
逻辑,请使用:

=ARRAY_CONSTRAIN(QUERY({'Sub List'!A2:AE, 
 TRANSPOSE(QUERY(TRANSPOSE('Sub List'!L2:U),,999^99)), 
 TRANSPOSE(QUERY(TRANSPOSE('Sub List'!V2:AE),,999^99))},
 "where "&TEXTJOIN(" or ", 1, 
 IF(B1="",,"Col32 contains '"&B1&"'"), 
 IF(B2="",,"Col32 contains '"&B2&"'"), 
 IF(B3="",,"Col32 contains '"&B3&"'"), 
 IF(B4="",,"Col32 contains '"&B4&"'"), 
 IF(B6="",,"Col33 contains '"&B6&"'"))&""), 999^99, 31)

用于组合(
位于黄色单元格之间,而
用于绿色单元格)

=ARRAY_CONSTRAIN(QUERY({'Sub List'!A2:AE, 
 TRANSPOSE(QUERY(TRANSPOSE('Sub List'!L2:U),,999^99)), 
 TRANSPOSE(QUERY(TRANSPOSE('Sub List'!V2:AE),,999^99))},
 "where ("&TEXTJOIN(" or ", 1, 
 IF(B1="",,"Col32 contains '"&B1&"'"), 
 IF(B2="",,"Col32 contains '"&B2&"'"), 
 IF(B3="",,"Col32 contains '"&B3&"'"), 
 IF(B4="",,"Col32 contains '"&B4&"'"))&")"&
 IF(B6="",," and Col33 contains '"&B6&"'"), 0), 999^99, 31)