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

表格的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 在多层循环中按层数返回循环变量。

相关推荐
我命由我123452 小时前
Excel - Excel 单元格格式同时设置日期时间
运维·学习·职场和发展·excel·求职招聘·职场发展·学习方法
我命由我123452 小时前
Excel - Excel 覆盖模式与编辑模式
运维·学习·职场和发展·excel·求职招聘·职场发展·运维开发
溜达的大象2 小时前
Ubuntu服务器之间校时
linux·ubuntu·excel
_小许_3 小时前
Go语言导入与导出excel文件
开发语言·golang·excel
我命由我123455 小时前
Excel - Excel 查看当前单元格格式
运维·学习·职场和发展·excel·求职招聘·职场发展·学习方法
开开心心就好6 小时前
免费智能证件合成工具,一键排版打印
windows·随机森林·计算机外设·word·逻辑回归·excel·csdn开发云
俊哥工具1 天前
电脑怎么玩手机APP?超简单新手教程
pdf·电脑·word·excel·音视频
程序大视界1 天前
【Python系列课程】Pandas(六):数据读写——CSV与Excel文件操作
python·excel·pandas
Land03291 天前
RPA 实现 Excel 自动化实操教程:批量数据处理零基础落地指南
自动化·excel·rpa
搬砖的小码农_Sky2 天前
Excel批量复制全攻略:从单列单行到高级场景
excel·人机交互