I try to add new row according to the number key in without button but failed
Example, when user key in 2 in column A2, it will add 2 row in below. If user key in 4 in column A2 will add 4 row in below. If user change the number in column A2 from 4 to 1 then will delete 3 row
Currently i using simple code as below
Code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Application.ScreenUpdating = False
Application.DisplayAlerts = False
If Not Intersect(Target, Range("M6:M10000")) Is Nothing Then
Cancel = True 'Prevent going into Edit Mode
Target.Font.Name = "Marlett"
If Target = vbNullString Then
Target = "a"
Target.Offset(1).EntireRow.Insert
Else
Target = vbNullString
End If
End If
Application.ScreenUpdating = True
End Sub
Display More