set orirg=range("l13")'基准单元格
application.calculation = xlmanual'因为表内公式多,为加快处理速度,暂停计算
for each bb in range("i3:al3")'循环检查非空区域
if len(bb)>0 then
rowpt=worksheetfunction.counta(range("l14:l50000"))'输出行定位
bb.offset(-1,0).resize(6,1).copy
orirg.offset(rowpt,9).pastespecial paste:=xlvalues, transpose:=true'转置粘贴数值
orirg.offset(rowpt,0).resize(1,7).value=range("b8:h8").offset(bb.value,1).value'直接赋值
endif
next i
application.calculation = xlautomatic
set orirg=nothing