我以这种方式处理数据:
Jonh Seedman New York, New York 01/01/1900
5th Ave +1 NXX-NXX-XXXX
Homer Simpson Springfield, Illinois. 02/01/1900
742 Evergreen Terrace +1 NXX-NXX-XXXX
Peter Parker New York, New York 03/01/1900
20 Ingram St +1 NXX-NXX-XXXX
我希望使用 Excel(而不是 VBA)获得以下结果:
NAME. BIRTH. STATE. ADDRESS. MOBILE
Jonh Seedman. 01/01/1900 New York, New York 5th Ave +1 NXX-NXX-XXXX
Homer Simpson 02/01/1900 Springfield, Illinois. 742 Evergreen Terrace +1 NXX-NXX-XXXX
Peter Parker 03/01/1900 New York, New York 20 Ingram St +1 NXX-NXX-XXXX
大家如果能提供任何提示,我们都会非常欢迎。感谢愿意花时间提供这些提示的人。
答案1
使用 中的原始数据A:C
,在 中输入列标题F1:J1
,然后输入以下公式:
F2: =IF(INDEX($A:$A,(ROWS($1:1)-1)*2+1)="","",INDEX($A:$A,(ROWS($1:1)-1)*2+1))
G2: =IF(INDEX($C:$C,(ROWS($1:1)-1)*2+1)="","",INDEX($C:$C,(ROWS($1:1)-1)*2+1))
H2: =IF(INDEX($B:$B,(ROWS($1:1)-1)*2+1)="","",INDEX($B:$B,(ROWS($1:1)-1)*2+1))
I2: =IF(INDEX($A:$A,(ROWS($1:1)-1)*2+2)="","",INDEX($A:$A,(ROWS($1:1)-1)*2+2))
J2: =IF(INDEX($B:$B,(ROWS($1:1)-1)*2+2)="","",INDEX($B:$B,(ROWS($1:1)-1)*2+2))
然后向下填充,直到开始看到空白