首页 > 解决方案 > 如何从选定的单元格范围创建唯一列表?

问题描述

我在单元格 A1:A16 中有一个食物列表,并希望创建一个唯一列表,其中每个项目仅在列表中出现一次:

Eggs
Bacon
Hashbrowns
Baked Beans
Avocado
Coffee
Bread
Bread
Sandwhich meet
Lettuce
Tomato
mustard
mayo
Crisps
Cheese
Crackers

我试过公式=unique(transpose(split(ArrayFormula(concatenate(A1:A16&" "))," ")))

但这会创建一个唯一列表并将诸如“烤豆”之类的单词拆分为新项目,如下所示:

Eggs
Bacon
Hashbrowns
Baked
Beans
Avocado
Coffee
Bread
Sandwhich
meet
Lettuce
Tomato
mustard
mayo
Crisps
Cheese
Crackers

如您所见,“baked”和“beans”显示为两个独立的项目。如何使其成为新唯一列表中的一项?

标签: google-sheetsgoogle-sheets-formula

解决方案


  • 要获得唯一的项目列表,您只需要这个:

    =UNIQUE(A1:A16)

  • 列格式:

    =TRANSPOSE(UNIQUE(A1:A16))

    0


推荐阅读