|
With Worksheets("步骤")
wksSrc.Cells(359, "a").Value = .Range("c262").Value
wksSrc.Cells(359, "d").Value = .Range("d262").Value
wksSrc.Cells(359, "h").Value = .Range("e262").Value
For irow = 263 To 266
wksSrc.Cells(irow + 97, "a").Value = .Cells(irow, 3).Value
wksSrc.Cells(irow + 97, "d").Value = .Cells(irow, 4).Value
wksSrc.Cells(irow + 97, "h").Value = .Cells(irow, 5).Value
Next
End With
With Worksheets("步骤")
wksSrc.Cells(380, "b").Value = .Range("d285").Value
wksSrc.Cells(380, "d").Value = .Range("e285").Value
wksSrc.Cells(380, "e").Value = .Range("f285").Value
wksSrc.Cells(380, "f").Value = .Range("g285").Value
wksSrc.Cells(380, "h").Value = .Range("h285").Value
For irow = 286 To 294
wksSrc.Cells(irow + 111, "b").Value = .Cells(irow, 4).Value
wksSrc.Cells(irow + 111, "d").Value = .Cells(irow, 5).Value
wksSrc.Cells(irow + 111, "e").Value = .Cells(irow, 6).Value
wksSrc.Cells(irow + 111, "f").Value = .Cells(irow, 7).Value
wksSrc.Cells(irow + 111, "h").Value = .Cells(irow, 8).Value
Next
End With
With Worksheets("步骤")
wksSrc.Cells(392, "a").Value = .Range("d297").Value
wksSrc.Cells(392, "c").Value = .Range("e297").Value
wksSrc.Cells(392, "e").Value = .Range("f297").Value
wksSrc.Cells(392, "f").Value = .Range("g297").Value
wksSrc.Cells(392, "h").Value = .Range("h297").Value
wksSrc.Cells(392, "i").Value = .Range("h297").Value
For irow = 298 To 301
wksSrc.Cells(irow + 95, "a").Value = .Cells(irow, 4).Value
wksSrc.Cells(irow + 95, "c").Value = .Cells(irow, 5).Value
wksSrc.Cells(irow + 95, "e").Value = .Cells(irow, 6).Value
wksSrc.Cells(irow + 95, "f").Value = .Cells(irow, 7).Value
wksSrc.Cells(irow + 95, "h").Value = .Cells(irow, 8).Value
wksSrc.Cells(irow + 95, "i").Value = .Cells(irow, 9).Value
Next
End With
End Sub
太长了 看不懂 ,不过前面的定义变量错了额
dim irow as byte 应改为 as integer
byte 数据范0-255 实际上你的行数超过了
|
|