You are on page 1of 1

Sub Renumbering()

'Updateby20141028
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type: =
8)
Set WorkRng = WorkRng.Columns(1).SpecialCells(xlCellTypeVisible)
xIndex = 1
For Each Rng In WorkRng
Rng.Value = xIndex
xIndex = xIndex + 1
Next
End Sub

You might also like