本帖最后由 cbtaja 于 2014-4-3 21:14 编辑
bb978079728 发表于 2014-4-3 20:33
感谢!另外还想问一下。A11、C11、E11、F11、G11、H11、J11,11行在每次保存的时候是肯定有的,12、13、1 ...
Sub 录入()
Dim arr(1 To 3, 1 To 9), brr, a8, a9, i&, m&
With Sheets("表1")
brr = .[A11:J13]
a8 = .[d8]
a9 = .[i18]
End With
For i = 1 To 3
If brr(i, 1) <> "" Then
m = m + 1
arr(m, 1) = brr(i, 1)
arr(m, 2) = brr(i, 3)
arr(m, 3) = brr(i, 5)
arr(m, 4) = brr(i, 6)
arr(m, 5) = brr(i, 7)
arr(m, 6) = brr(i, 8)
arr(m, 7) = brr(i, 10)
arr(m, 8) = a8
arr(m, 9) = a9
End If
Next
Sheets("表2").[a65536].End(xlUp).Offset(1, 0).Resize(m, 9) = arr
End Sub
|