Sub 计算明细表固定模板自动填充打印()
Dim arr, i, t
arr = Sheets("脱贫户已套公式 (系统版)").UsedRange
For i = 2 To UBound(arr)
With Sheets("附件3")
For Each t In Array(Array("d4", 1), Array("h4", 4), Array("n4", 5), Array("f6", 15), Array("f7", 16), Array("c10", 50), Array("f10", 51), Array("i10", 52), Array("l10", 53), Array("o10", 54), Array("c11", 55), Array("f11", 56), Array("i11", 57), Array("l11", 58), Array("o11", 59), Array("c19", 60), Array("f19", 61), Array("i19", 62), Array("l19", 63), Array("o19", 64), Array("c13", 70), Array("f13", 71), Array("i10", 72), Array("l13", 73), Array("o13", 74), Array("r13", 75), Array("aa13", 77), Array("c14", 78), Array("f14", 79), Array("i14", 80), Array("l14", 81), Array("o14", 82), Array("r14", 83), Array("z14", 85), Array("c21", 86), Array("f21", 87), Array("i21", 88), Array("l21", 89), Array("o21", 90), Array("r21", 91), Array("z21", 93), Array("b25", 41), Array("c25", 35), Array("f25", 43), Array("i25", 44), Array("f25", 43), Array("l25", 37), Array("r25", 45), Array("t25", 39), Array("u25", 40), Array("v25", 31), Array("z25", 46), Array("ac9", 26), Array("ac19", 27), Array("ac13", 24), _
, Array("ac21", 25), Array("ac25", 30), Array("f6", 14), Array("f7", 15), Array("c28", 15), Array("j28", 19), Array("p28", 30), Array("w28", 9), Array("c29", 28), Array("i29", 25), Array("u29", 10), Array("c30", 9), Array("k30", 10), Array("r30", 5), Array("t30", 11))
.Range(t(0)) = arr(i, t(1))
Next t
.PrintOut
End With
Next i
End Sub
已上传附件,请帮忙改一下,谢谢!
就是.Range(t(0)) = arr(i, t(1))这句不得行
|