我有某些数据,我希望在多个工作表和包含“零售商名称”的多个列中使用唯一的零售商名称作为标题。我已经分享了可编辑的谷歌工作表链接,敬请帮助!
https://docs.google.com/spreadsheets/d/1RM21N_w7mWTltMQi5Iq-p8iBaqJwegj94NwZVxfy5ng/edit#gid=0
发布于 2022-06-27 12:56:53
下面的公式组合了来自"Gadget Sack“、"Bloomindales”和"Legacy“工作表的数据。
=query(unique(flatten(query({'Gadget Shack'!A2:AC},"Select "&ArrayFormula(join(", ",text(query(transpose({column('Gadget Shack'!A2:AC2);mod(column('Gadget Shack'!A2:AC2)-column('Gadget Shack'!A2),3)}),"Select Col1 where Col2=0"),"Col0")))),query({Bloomingdales!A2:AC},"Select "&ArrayFormula(join(", ",text(query(transpose({column(Bloomingdales!A2:AC2);mod(column(Bloomingdales!A2:AC2)-column(Bloomingdales!A2),3)}),"Select Col1 where Col2=0"),"Col0")))),query({Legacy!A2:AC},"Select "&ArrayFormula(join(", ",text(query(transpose({column(Legacy!A2:AC2);mod(column(Legacy!A2:AC2)-column(Legacy!A2),3)}),"Select Col1 where Col2=0"),"Col0")))))),"select Col1 where Col1 is not null order by Col1")
该公式由三个要素组成:
query({'Gadget Shack'!A2:AC},"Select "&ArrayFormula(join(", ",text(query(transpose({column('Gadget Shack'!A2:AC2);mod(column('Gadget Shack'!A2:AC2)-column('Gadget Shack'!A2),3)}),"Select Col1 where Col2=0"),"Col0")))) flatten (query, query, query)在一个列中输出结果unique -获取零售商名称的唯一值query("select Col1 where Col1 is not null order by Col1") -从结果中删除空白行,并按alpha顺序输出结果。发布于 2022-06-27 09:24:20
=unique(flatten(A2:A7,C2:C7,E2:E7))
Flatten由来自多个列的数据组成,并将该数据转换为单个列。

https://webapps.stackexchange.com/questions/165265
复制相似问题