将格内多行文字展开成多格

表格的A列是分类,B列由多行文字组成,即分隔符是换行符。

|---|----------------|-------------------------------------------------------------------------------------------------------------------------|
| | A | B |
| 1 | Account Number | Interaction |
| 2 | 1 | Jan 1,2023 - Hello. |
| 3 | 2 | Jan 2, 2023 - Good morning. Jan 3, 2023 - Good night. Jan 4, 20 Jan 5, 2023 - Good night. Jan 6, 2023 - Good afternoon. |
| 4 | 3 | Jan 1,2023 - Good night. Jan 2, 2023 - Good afternoon. |

请将B列的每格展开成多个单元格,并复制A列

|---|----------------|-------------------------------|
| | A | B |
| 1 | Account Number | Interaction |
| 2 | 1 | Jan 1,2023 - Hello. |
| 3 | 2 | Jan 2, 2023 - Good morning. |
| 4 | 2 | Jan 3, 2023 - Good night. |
| 5 | 2 | Jan 4, 20 |
| 6 | 2 | Jan 5, 2023 - Good night. |
| 7 | 2 | Jan 6, 2023 - Good afternoon. |
| 8 | 3 | Jan 1,2023 - Good night. |
| 9 | 3 | Jan 2, 2023 - Good afternoon. |

使用 SPL XLL

复制代码
=spl("=?.news@q(~2.import@si();[get(1)(1),~])",A2:B4)

函数 news@q 用序列的成员生成新序列,~2 是当前变量的第 2 个成员,import@si将字符串按回车解析成单行字符串组成的序列,get 在多层循环中按层数返回循环变量。

相关推荐
帆张芳显7 小时前
前端表格公式能力新选择|智表 ZCell 公式引擎深度剖析
前端·excel·canva可画·excel插件
地图小课堂8 小时前
Bigemap Pro 导入 Excel、CSV、TXT 点位表格教程
excel
我的愿望是成为富婆9 小时前
2027校招准备:从Excel操作到数据分析,还缺业务、SQL与统计思维
sql·数据分析·excel
用户0332126663671 天前
Python 自动化办公:如何从零快速生成结构清晰的 Excel 报表
python·excel
千桐科技1 天前
qData 数据中台专业版功能解析:告别 Excel 与 SQL 拼凑,打通系统合并的可追踪数据链路
数据库·sql·excel·qdata
百事牛科技1 天前
从局部到整体:Excel限制功能的几种实用设置
windows·excel
ProcessOn官方账号1 天前
ProcessOn Office 插件上线:在 Word / Excel / PPT 里直接画流程图
word·excel·插件·office·processon
reasonsummer3 天前
【办公类-53-12】20261016(预测)Python模仿制作2026学年第二学期校历(excel+pdf,上下学期都包含)
pdf·excel
泡海椒3 天前
JQuick-Excel 自定义 SPI Provider:用 fullName 扩展 TRANSFORM 函数
驱动开发·excel
泡海椒3 天前
从 XML 到 Excel:JQuick-Excel 代理与解析器如何协作
xml·excel