Excel UNIQUE Across Columns

让人想犯罪 __ 提交于 2020-07-14 09:23:50

问题


Is it possible for the new function UNIQUE to be used across various columns & have the output spill into a single column?


Desired output is UNIQUE values in one single column based on all of the values present in Columns: A, B, & C (duplicates in red in example)


  • If I just use UNIQUE(A7:C7) I get a spill range across columns (this doesn't even provide unique values across columns which was unexpected)
  • I also tried UNIQUE(A2:A6) & UNIQUE(B5:B10) & UNIQUE(C2:C5) but this just concatenated the values (also unexpected but not relevant)

回答1:


There may be a better approach, but here is one using TEXTJOIN and FILTERXML to create an array that you can call UNIQUE on:

=SORT(UNIQUE(FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,A1:C6)&"</s></t>","//s")))



来源:https://stackoverflow.com/questions/62204826/excel-unique-across-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!