
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
If Target.Column = 4 And Target.Row > 1 Then
If Target > 1 Then
Application.EnableEvents = False
For i = 1 To Target - 1
Target.Offset(1).EntireRow.Insert shift:=xlShiftDown
Target.EntireRow.Copy Target.Offset(1).EntireRow
Next
Application.EnableEvents = True
End If
End If
End Sub |
Sub splitta()
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
If Target.Column = 4 And Target.Row > 1 Then
If Target > 1 Then
Application.EnableEvents = False
For i = 1 To Target - 1
Target.Offset(1).EntireRow.Insert shift:=xlShiftDown
Target.EntireRow.Copy Target.Offset(1).EntireRow
Next
Application.EnableEvents = True
End If
End If
End Sub
|
Option Explicit
Sub splitta()
Dim i As Integer
If Target.Column = 4 And Target.Row > 1 Then
If Target > 1 Then
Application.EnableEvents = False
For i = 1 To Target - 1
Target.Offset(1).EntireRow.Insert shift:=xlShiftDown
Target.EntireRow.Copy Target.Offset(1).EntireRow
Next
Application.EnableEvents = True
End If
End If
End Sub |
