0
如何将多行转换为一列?
以下是我的CSV文件数据。名称,位置,手机,电子邮件重复多次。有时,位置可能会丢失,移动设备可能会有多个条目。如何将多行转换为一组列?
Name,XXX
Location,Berlin
Mobile,999xxxxx00
Email, [email protected]
Name, YYYYY
Location,Paris
Mobile,999xxxxx33,999xxxxx55
Email, [email protected],[email protected]
Name, ZZZZZ
Mobile,989xxxxx65,899xxxxx60,799xxxxx89.899xxx6590,889xxxxx60
Email, [email protected]
Name,PPPP
Location,Spain
Mobile,999xxxxx77,
Email,[email protected]
Name,QQQQQ
Location,London
Mobile,999xxxxx65,999xxxxx60,999xxxxx89.999xxx6590
Email,[email protected]
我想这个数据应该符合如下图所示:
Name | Location | Mobile | E-mail
----------------------------------------------------
XXXx Berlin 999xxxxx00 [email protected]
YYYYY Paris 999xxxxx33 [email protected]
YYYYY 999xxxxx55 [email protected]
ZZZZZ 989xxxxx65 [email protected]
899xxxxx60
799xxxxx89
899xxx6590
889xxxxx60
PPPP Spain 999xxxxx77 [email protected]
QQQQQ London 999xxxxx65 [email protected]
999xxxxx60
999xxxxx89
999xxx6590
这将是更好,如果显示,而不是反复使得空的名字。
我认为你的解决方案在于使用VBA。 – Luuklag