|
工程已标价工程量清单(2).rar
(30.13 KB, 下载次数: 11)
Sub 宏1()
Dim rng As Range, firstAddress As String, cel As Range
'Application.FindFormat.Clear '发现查找出序号那一行向上延伸9行删除即可?
Set rng = Range("A30:A211").Find(what:="序号", after:=Range("A170"))
If Not rng Is Nothing Then
firstAddress = rng.Address
Do
rng.Offset(-8).Resize(9).EntireRow.ClearContents
If cel Is Nothing Then
Set cel = rng.Offset(-8).Resize(9)
Else
Set cel = Application.Union(cel, rng.Offset(-8).Resize(9))
End If
Set rng = Sheet1.Range("A30:A211").FindPrevious(after:=rng)
Loop While Not rng Is Nothing
End If
cel.EntireRow.Delete
End Sub
|
|