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

表格的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 小时前
2005-2025年我国逐日露点温度栅格数据
数据分析·excel
LAM LAB9 小时前
【VBA】Excel实现批量对单元格替换、加粗文字
excel·vba
海兰10 小时前
【接上篇】多格式文档支持扩展方案(PDF_Word_Excel)
pdf·word·excel
小趴菜克鲁里10 小时前
游戏Excel配置自动化导出二进制工具链并生成对应配置类详解
游戏·自动化·excel
道纪书生10 小时前
解决报错:很抱歉,powerpoint/word/excel遇到错误,使其无法正常工作......
word·powerpoint·excel
南部余额11 小时前
Apache POI 从入门到实战:Excel 与 Word操作攻略
java·word·excel·poi
橙露1 天前
Python 办公自动化:批量处理 Excel/Word/PPT 实战教程
python·word·excel
开开心心_Every1 天前
系统清理工具清理缓存日志,启动卸载管理
运维·服务器·网络·数学建模·电脑·excel·抽象代数
开开心心就好2 天前
免费音频转文字工具,绿色版离线多模型可用
人工智能·windows·计算机视觉·计算机外设·ocr·excel·语音识别
fengyehongWorld2 天前
Excel 计算两次请求之间耗费的毫秒数
excel