Based on other's recommendations from other sites, I tried the formula (below), but received a formula parse ERROR message and tried moving the curly brackets to just around the ImportRange formula, but continued to receive a formula parse ERROR MESSAGE=QUERY{(IMPORTRANGE("1avE5TJIDVNL7_wqjDLPgocZuecr5Aoz7aI3cI5yIe34", "Data!A3:Ak1000");IMPORTRANGE("10q7kBUJVTw62p1cCZjUIR1CsFSev9Ik6q4K-X-RK40Y", "Data!A3:Ak1000")},"SELECT Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col26, Col27, Col28, Col29 WHERE Col3 CONTAINS 'ESL' AND Col7>0")我希望输出将列出Col3中包含"ESL"的所有类以及两个工作表中的相应列.I expect that the output will list any classes that contain "ESL" in Col3 and the corresponding columns from both sheets.推荐答案 了解 ARRAY_LITERAL错误:如果两个查询都输出某些内容,那么一切都很好:understanding ARRAY_LITERAL ERROR:if both queries output something then all is good:但是,如果其中一个查询没有任何要输出的内容,则会输出#N/A,但问题是#N/A仅位于第一个单元格中:however if one of those queries doesn't have anything to output it outputs #N/A but the issue is that #N/A is only in the 1st cell:但是数组期望两边的矩阵都相同(两个查询都有4列):but array expects that matrix on both sides to be same (4 columns from both queries):因此我们将每个查询都包装到IFERROR中,并在出现错误的情况下输出带有4个伪列的伪行- {"","","",""} -这将欺骗数组以使其输出:so we wrap each query into IFERROR and in case of error we output fake row with 4 fake columns - {"","","",""} - which will trick the array to output it like:因此请尝试这样:=IFERROR(QUERY({IFERROR(QUERY(IMPORTRANGE( "1avE5TJIDVNL7_wqjDLPgocZuecr5Aoz7aI3cI5yIe34", "Data!A3:AK1000"), "select Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col26,Col27,Col28,Col29 where Col3 contains 'ESL' and Col7>0", 0), {"","","","","","","","","","",""}); IFERROR(QUERY(IMPORTRANGE( "10q7kBUJVTw62p1cCZjUIR1CsFSev9Ik6q4K-X-RK40Y", "Data!A3:AK1000"), "select Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col26,Col27,Col28,Col29 where Col3 contains 'ESL' and Col7>0", 0), {"","","","","","","","","","",""})}, "where Col1 is not null", 0)) 这篇关于使用Query/ImportRange公式从多个工作表中导入数据,并返回ARRAYLITERAL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-12 17:10