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

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

相关推荐
徐赛俊16 小时前
Excel 打开后界面一片灰、无工作表的原因与解决方案(Markdown 教程)
excel
hacker70717 小时前
精进Excel图表:AI赋能,成为Excel图表高手
人工智能·信息可视化·excel
Data-Miner18 小时前
结合AI Agent的excel大数据处理技巧
人工智能·excel
如意机反光镜裸18 小时前
批量处理Excel数据
excel·批量处理
dyxal18 小时前
Excel情感标注工具性能优化实战:从卡顿到流畅的蜕变
网络·性能优化·excel
Non-existent98719 小时前
Excel/CSV转GIS:一键WKT转gdf、Shapefile等图层
信息可视化·excel
dyxal20 小时前
Excel情感标注工具:用Python+Flask打造高效数据标注平台
python·flask·excel
开开心心就好20 小时前
音频格式互转工具,支持Mp3ApeWavFlac互转
java·网络·c++·windows·qt·电脑·excel
夜流冰1 天前
Excel - MS Support for Excel: 2 Collaborate
数据库·windows·excel
LingRannn2 天前
【vim 中如何替换】
编辑器·vim·excel