标签: google-sheets unique google-sheets-formula google-sheets-query google-query-language
我需要查询两张纸并返回与特定条件匹配的所有列和唯一值。
我已经用过了,但是不起作用:
=UNIQUE(QUERY(Sheet1!A:D,Sheet2!A:D, "select * where B=0"))
我的共享表:
https://docs.google.com/spreadsheets/d/1ysuvyBHU21uXv_DxzBJwC7tMnGPyaqFqab7m1d-vwyo/edit?usp=sharing
答案 0 :(得分:1)
=UNIQUE(QUERY({Sheet1!A:D; Sheet2!A:D}, "where Col2=0"))
=UNIQUE(QUERY({ Sheet1!A:D, {"Name"; TRANSPOSE(SPLIT(REPT("♦Comp1", ROWS(Sheet1!A:A)-1), "♦"))}; Sheet2!A:D, TRANSPOSE(SPLIT(REPT("♦Comp2", ROWS(Sheet2!A:A)), "♦"))}, "where Col2=0"))