问题补充说明:已知词:想得到的结果:
方法1、用V360问答BA
Dimsj,jg(),m%,n%,k
Subkagawa()
tms=Timer
sj=[a1].CurrentRegion
m=UBound(sj):n=UBound(sj,2):Amn=m^n
IfAmn>65536ThenExitSubElseReDimjg(Amn,1Ton+1):k=0
CalldgMN("",0)
WithActiveCell.CurrentRegion.Cells(1).Offset(m+3)
.CurrentRegion="":
.Resize(k,n+1)=jg
EndWith
MsgBoxk&vbCr&Format(Timer-tms,"0.000s")
EndSub
SubdgMN(s,t)
Ift=块纸nThen
p=Split(s,",")
jg(k,1)=sj(p评(1),1)
jg(k,n+1)=sj(p(1),1)
Forj=2Ton
jg(k,j)=多义述起一sj(p(j),j)
Ifjg(k,j)<=jg(k,j-1)ThenExitSub
jg(k,n+1移算难聚父清每势鲜妈初)=jg(k,n+1)&","&sj(p(j),j)
Next
k=k+1:ExitSub
EndIf
Forj=1Tom
影输孩Ifsj(j,t+1)<>""ThenCalldgMN(s&","&j,t+1)
Nextj
营青片轴角苏夫孙她EndSub
方法2:INDEX函数
参见:http://jingya须从移国情扩搞倍厂n.baidu.com/article/0eb457e5049斯营乎掌宪一土坚事仅八ad703f0a9迅阶物严流即强待055e.html