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

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

相关推荐
Metaphor69216 小时前
使用 Python 在 Excel 文件中查找并替换
python·excel
xiaomin-Michael16 小时前
EXCEL pivot table
excel
包子源16 小时前
PDF 转 Word/Excel 全链路实战:Next.js + 阿里云文档智能
pdf·word·excel
Java知识技术分享17 小时前
excel动态表头实现+异步使用
java·spring·excel
tedcloud1231 天前
academic-research-skills部署教程:构建AI辅助科研环境
服务器·人工智能·word·excel·dreamweaver
wtsolutions1 天前
Sheet-to-Doc Excel Add-in Released, Install Directly from Microsoft AppSource
microsoft·excel
开开心心就好2 天前
完美兼容Office格式的免费办公套件
windows·均值算法·计算机外设·word·excel·csdn开发云·图搜索算法
未来之窗软件服务2 天前
Excel 物流货运记账表模板【万象EXCEL(二十七)】—东方仙盟
excel·仙盟创梦ide·东方仙盟·万象excel
Land03292 天前
Excel 自动化 RPA 教程:批量处理、报表生成与数据汇总实战,离线方案详解
自动化·excel·rpa