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

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

相关推荐
E_ICEBLUE15 小时前
Excel vs CSV:在系统数据处理中该如何选择?
java·excel·csv·格式转换
weixin_3180881120 小时前
Power query代替PowerBI加载数据到excel
excel·powerbi·power query
weixin_419349791 天前
excel批量把自身加上链接,这一列本身就是网址
excel
meng半颗糖1 天前
vue3+typeScript 在线预览 excel,word,pdf
typescript·word·excel
开开心心_Every1 天前
时间自动校准工具:一键同步网络服务器时间
游戏·随机森林·微信·pdf·逻辑回归·excel·语音识别
清山博客1 天前
EXCEL根据身份证号计算出生日期和截止某日的年龄
excel
偷心伊普西隆1 天前
Python EXCEL 半自动化切分数据集
python·自动化·excel
weixin_462446232 天前
Python 解析 Excel 图表(Chart)信息实战:从 xlsx 中提取标题、字体和数据
python·数据分析·excel·报表自动化
薛定谔的猫喵喵2 天前
解决 xlrd 2.0+ 版本只支持 xls 格式的问题
python·excel
椎4952 天前
苍穹外卖资源点整理+个人错误解析-Day12-数据统计-EXCEL报表
excel