How could I make the code to insert rows when the column "F" is double clicked and copy contents from Columns C,D,& Q. My data in column F starts from column F18.
Code: Select all
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim LR As Integer
If Target.Column > 6 Then Exit Sub
Cancel = True
Target.Offset(1, 0).Rows("1:1").EntireRow.Insert Shift:=xlDown
Target.Resize(1, 9).AutoFill Destination:=Range(Target, Target.Offset(1, 8)), Type:=xlFillDefault
Target.Offset(1, 3).Resize(6, 2).ClearContents
LR = Empty
End Sub