-1

我有一个查询:

=query(test_data_set!A2:C;"SELECT A, B, C" & if(countblank(dash!C1:C6)=6;"";" WHERE " & textjoin(" OR "; true; dash!C1:C4)) & "ORDER BY B";0)

在 C1:C4 中有一个文本
在 C5:C6 中有 2 个日期

所以我需要添加查询 textjoin(" AND "; true; dash!C5:C6)

我该怎么做?

我这样做的方式不起作用: =query(test_data_set!A2:C;"SELECT A, B, C" & if(countblank(dash!C1:C6)=6;"";" WHERE " & textjoin(" OR "; true; dash!C1:C4) & textjoin(" AND "; true; dash!C5:C6)) & "ORDER BY B";0)

请帮忙

4

1 回答 1

0

这样可行

=IFERROR(query(test_data_set!A2:C;"SELECT A, B, C WHERE A IS NOT NULL" & if(countblank('Dazrin Copy of Dash'!C1:C6)=ROWS(C1:C6);"" ;" AND " &IF(COUNTBLANK(C1:C4)<>ROWS(C1:C4);"("& textjoin(" OR "; true; 'Dazrin Copy of Dash'!C1:C4)&")";) &IF(AND(COUNTBLANK(C1:C4)<>ROWS(C1:C4);COUNTBLANK(C5:C6)<>ROWS(C5:C6));" AND ";)& "("&textjoin(" AND "; true; 'Dazrin Copy of Dash'!C5:C6) & ")") & " ORDER BY B ASC";0);"未找到任何项目")

于 2018-11-18T12:18:48.583 回答