Excel 每 N 行拼成一行
F列每四行对应一条记录:
A |
B |
C |
D |
E |
F |
|
1 |
Name |
Address |
City |
Short ID |
Company 1 |
|
2 |
2222 al street |
|||||
3 |
Blue cheese |
|||||
4 |
1 |
|||||
5 |
Company 2 |
|||||
6 |
1111 arm rd |
|||||
7 |
Ranch |
|||||
8 |
2 |
|||||
9 |
Company 3 |
|||||
10 |
3333 raindrop drive |
|||||
11 |
Peanut |
|||||
12 |
3 |
需要把F列整理成规范表格,按行写入A-D:
A |
B |
C |
D |
E |
F |
|
1 |
Name |
Address |
City |
Short ID |
Company 1 |
|
2 |
Company 1 |
2222 al street |
Blue cheese |
1 |
2222 al street |
|
3 |
Company 2 |
1111 arm rd |
Ranch |
2 |
Blue cheese |
|
4 |
Company 3 |
3333 raindrop drive |
Peanut |
3 |
1 |
|
5 |
Company 2 |
|||||
6 |
1111 arm rd |
|||||
7 |
Ranch |
|||||
8 |
2 |
|||||
9 |
Company 3 |
|||||
10 |
3333 raindrop drive |
|||||
11 |
Peanut |
|||||
12 |
3 |
使用 SPL XLL,输入公式:
=spl("=?.(~(1)).group((#-1)\4)",F1:F12)
~(1)表示取当前成员的第 1 个子成员,group 用于分组,(#-1)\4 相等的成员将分到同一组,其中 #是成员序号,符号 \ 表示除法取整。
英文版