|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 hgh_ 于 2022-4-10 23:32 编辑
Sub zz()
zh = Array([b2].Value)
xh = Array([b3].Value)
dj = Array([b4].Value)
ch = Array([b5].Value)
sj = Array([b6].Value)
sf = Array([b7].Value)
dh = Array([b8].Value)
With Sheet1
lr = .[b65536].End(3).Row + 1
.Cells(lr, 4).Resize(1, UBound(zh) + 1) = zh
.Cells(lr, 5).Resize(1, UBound(xh) + 1) = xh
.Cells(lr, 6).Resize(1, UBound(dj) + 1) = dj
.Cells(lr, 9).Resize(1, UBound(ch) + 1) = ch
.Cells(lr, 10).Resize(1, UBound(sj) + 1) = sj
.Cells(lr, 11).Resize(1, UBound(sf) + 1) = sf
.Cells(lr, 12).Resize(1, UBound(dh) + 1) = dh
If lr = 2 Then
.Cells(lr, 1) = 1
Else
.Cells(lr, 1) = .Cells(lr - 1, 1) + 1
End If
End With
Range("b2").Select
End Sub
|
|