You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求Google Sheets公式:从逗号分隔单列数据生成唯一值列

Google Sheets 提取逗号分隔值的唯一列表公式

需求

单列数据中每行包含多个逗号分隔的值,需生成所有值的唯一列表并显示在一列。

公式(假设原始数据在A列)

=UNIQUE(FLATTEN(SPLIT(TEXTJOIN(", ", TRUE, A:A), ", ")))

公式说明

  • TEXTJOIN(", ", TRUE, A:A):将A列所有非空单元格的内容用", "拼接成单个字符串
  • SPLIT(..., ", "):把拼接后的字符串按", "分割为多维数组
  • FLATTEN(...):将多维数组转换为一维数组
  • UNIQUE(...):提取一维数组中的唯一值,自动去重并按出现顺序排列

原始数据

原始数据
Catch-Up Q3, GROWTH, H1 2023 [Business need - Regular], H1 2023 [ALL]
Catch-Up Q3, H1 2023 [Business need - Regular]
CORPO, H1 2023 [ALL], H1 2023 [Business need - Intensive]
CORPO, H1 2023 [Business need - Intensive]
CORPO, H1 2023 [Business need - Regular], H1 2023 [ALL]
GROWTH, Catch-Up Q3, H1 2023 [ALL], H1 2023 [Business need - Regular]
GROWTH, CORPO, H1 2023 [ALL], H1 2023 [Integration need]
GROWTH, H1 2023 [ALL], H1 2023 [Business need - Regular]
GROWTH, H1 2023 [Business need - Regular], H1 2023 [ALL]
GROWTH, H1 2023 [Integration need]
H1 2023 [ALL], CORPO, H1 2023 [Business need - Intensive]
H1 2023 [ALL], CORPO, H1 2023 [Integration need]
H1 2023 [ALL], GROWTH, H1 2023 [Business need - Regular]
H1 2023 [ALL], H1 2023 [Business need - Intensive], CORPO
H1 2023 [ALL], H1 2023 [Business need - Intensive], GROWTH
H1 2023 [ALL], H1 2023 [Business need - Regular], CORPO
H1 2023 [ALL], H1 2023 [Business need - Regular], GROWTH
H1 2023 [ALL], H1 2023 [Business need - Regular], OPS
H1 2023 [ALL], H1 2023 [Business need - Regular], TECH
H1 2023 [ALL], H1 2023 [Integration need], Catch-Up Q3, GROWTH
H1 2023 [ALL], H1 2023 [Integration need], CORPO
H1 2023 [ALL], H1 2023 [Integration need], OPS
H1 2023 [ALL], H1 2023 [Integration need], PRODUCT
H1 2023 [ALL], H1 2023 [Integration need], TECH
H1 2023 [ALL], OPS, H1 2023 [Business need - Regular]
H1 2023 [ALL], OPS, H1 2023 [Integration need]
H1 2023 [ALL], PRODUCT
H1 2023 [ALL], TECH, H1 2023 [Business need - Intensive]
H1 2023 [Business need - Intensive]
H1 2023 [Business need - Intensive], CORPO
H1 2023 [Business need - Intensive], CORPO, H1 2023 [ALL], OPS
H1 2023 [Business need - Intensive], CORPO, OPS, H1 2023 [ALL]
H1 2023 [Business need - Intensive], TECH, H1 2023 [ALL]
H1 2023 [Business need - Regular]
H1 2023 [Business need - Regular], Catch-Up Q3
H1 2023 [Business need - Regular], GROWTH, H1 2023 [ALL]
H1 2023 [Business need - Regular], H1 2023 [ALL], CORPO, H1 2023 [Business need - Intensive]
H1 2023 [Business need - Regular], H1 2023 [ALL], GROWTH
H1 2023 [Business need - Regular], H1 2023 [ALL], OPS
H1 2023 [Business need - Regular], H1 2023 [ALL], PRODUCT
H1 2023 [Business need - Regular], H1 2023 [ALL], TECH
H1 2023 [Business need - Regular], OPS, Catch-Up Q3
H1 2023 [Business need - Regular], OPS, H1 2023 [ALL]
H1 2023 [Business need - Regular], TECH, H1 2023 [ALL]
H1 2023 [Integration need]
H1 2023 [Integration need], H1 2023 [ALL], OPS
H1 2023 [Integration need], TECH
H1 2023 [Integration need], TECH, H1 2023 [ALL]
OPS, H1 2023 [ALL], H1 2023 [Business need - Intensive]
OPS, H1 2023 [ALL], H1 2023 [Integration need]
OPS, H1 2023 [Business need - Intensive]
OPS, H1 2023 [Business need - Intensive], H1 2023 [ALL]
OPS, H1 2023 [Business need - Regular], H1 2023 [ALL]
OPS, H1 2023 [Integration need], H1 2023 [ALL]
PRODUCT, H1 2023 [ALL], H1 2023 [Business need - Regular]
PRODUCT, H1 2023 [ALL], H1 2023 [Integration need]
PRODUCT, H1 2023 [Business need - Intensive]
PRODUCT, H1 2023 [Business need - Regular]
PRODUCT, H1 2023 [Integration need], H1 2023 [ALL]
TECH, H1 2023 [ALL], Catch-Up Q3, H1 2023 [Business need - Intensive]
TECH, H1 2023 [ALL], H1 2023 [Business need - Regular]
TECH, H1 2023 [ALL], H1 2023 [Integration need]
TECH, H1 2023 [Business need - Intensive], H1 2023 [ALL]
TECH, H1 2023 [Business need - Regular], H1 2023 [ALL]
TECH, H1 2023 [Integration need]

预期结果

结果
Catch-Up Q3
CORPO
GROWTH
H1 2023 [ALL]
H1 2023 [Business need - Intensive]
H1 2023 [Business need - Regular]
H1 2023 [Integration need]
OPS
PRODUCT
TECH

内容的提问来源于stack exchange,提问作者fini-stair

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.21 08:59:56