【发布时间】:2016-03-11 03:59:58
【问题描述】:
到目前为止,这是我的代码。问题是它删除了第一行。我想排除第一行(标题)。因为我删除的行是重复的标题
[代码] 使第一行变暗 将 Lastrow 调暗 调暗 Lrow 只要 将 CalcMode 调暗 使 ViewMode 变暗
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
With ActiveSheet.Select
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView
.DisplayPageBreaks = False
Firstrow = .UsedRange.Cells(2).Row
Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
For Lrow = Lastrow To Firstrow Step -2
With .Cells(Lrow, "D")
If Not IsError(.Value) Then
If .Value = "Service Tower" Then .EntireRow.Delete
End If
End With
Next Lrow
End With
ActiveWindow.View = ViewMode
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With [code]
【问题讨论】: