You may try something like this...
After deleting rows, run the following code which will add the sequence number in column A starting from row2.
Sub SqNumber()
Dim lr As Long
lr = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
With Range("A2:A" & lr)
.Formula = "=Row()-1"
.Value = .Value
End With
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…