|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
请见代码。
- Sub 删除加粗行()
- Dim Arr, i&
- Application.ScreenUpdating = False
- With ActiveSheet
- Arr = .[a1].CurrentRegion
- For i = UBound(Arr) - 3 To 3 Step -1
- If Len(Arr(i, 2)) = 0 Then .Rows(i).Delete
- Next
- End With
- Arr = [a1].CurrentRegion
- For i = 2 To UBound(Arr) Step 32
- Cells(i, 1).Resize(1, 17).Select
- With Selection.Borders(xlEdgeBottom)
- .LineStyle = xlContinuous
- .Color = -1003520
- .Weight = xlMedium
- End With
- Next
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|