'自定义公式-按ALT+F11-插入模块-粘贴代码-将表格另存为启用宏的格式。
Function转换(aAsRange,fAsString,gAsString)。
ForI=2Toa.Cells(2,1).End(xlDown).Row。
Forj=2Toa.Columns.Count。
Ifa.Cells(I,j)<>""Then。
b=b&""&a.Cells(I,j)。
c=c&""&a.Cells(I,1)。
EndIf
Next
Next
d=Split(c,"")。
e=Split(b,"")。
Ifg=1Then转换=d(f)
Ifg=2Then转换=e(f)
EndFunction
输入公式下拉右拉
还没有评论,来说两句吧...