|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
With Sheets("B班")
lr2 = .Cells(Rows.Count, 1).End(3).Row
For i = 3 To lr2
If .Cells(i, 1) = "姓名" Then
s = .Cells(i, 3).Value
.Cells(i + 3, 6).Resize(31, 19) = ""
If d.exists(s) Then
For x = i + 3 To i + 33
ss = .Cells(x, 1).Value
j = 6
If d(s).exists(ss) Then
For Each k In d(s)(ss).keys
.Cells(x, j).Resize(1, 3) = d(s)(ss)(k)
.Cells(x, j + 3) = .Cells(x, j + 1) * .Cells(x, j + 2)
j = j + 5
Next
End If
i = i + 1
Next x
End If
i = i + 9
End If
Next i
End With
加2句 |
|