View Single Post
 
Old 06-23-2020, 08:43 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
By slightly editing the posted macro, you can achieve the goal you desire :

Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim I As Integer
    I = 1
    Application.EnableEvents = False
    For I = 1 To 50
        Range("A" & I).Value = I - 1
    Next
    Application.EnableEvents = True
End Sub
The above is designed to delete one row at a time and still maintain the
correct numbering in your column. Your original post indicated you are
deleting one row at a time.

It has been a pleasure helping you. Stay healthy !
Reply With Quote