|
楼主 |
发表于 2017-11-27 21:54
来自手机
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
已解决,但没明白这个代码的意思!()
班表填充()
Sub a()
Sheets(1).Cells.Copy Sheets(2).[a1]
With Sheets(2)
.Rows("1:114").Delete
er = .Cells.Find("每页行数").Row
For i = 2 To er
If .Cells(i, 1) <> "" Then
arr = Split(.Cells(i, 1), ",")
.Cells(i, 1) = arr(0)
If UBound(arr) > 0 Then
.Cells(i, 2) = arr(1)
End If
Else
For j = 1 To 3
.Cells(i, j) = .Cells(i - 1, j)
Next
End If
Next
.Rows(er).Resize(10000).Delete
For i = er To 2 Step -1
If .Cells(i, 1) = "姓名" Then
.Rows(i).Delete
End If
Next
End With
End Sub
|
|