#1
|
|||
|
|||
ashamed to having to ask
Hi
Have attached single page sheet. all I want to do is insert another row of cells AA to AL between current row and the red line and to copy the formulas. Having gotten into all sorts of mess I have resorted to simple stage approach. As you will see the first bit of code tries to insert AA to AL after entering a date in AA. Cursor moves to AB alright but the the code continues to insert row after row of blank cells - moving current row down each time. I cannot stop this happening??? help |
#2
|
|||
|
|||
Maybe something like this ?
Code:
Private Sub Worksheet_Change(ByVal Target As Range) 'limit target to a single cell at a time If Target.Count > 1 Then Exit Sub 'limit to specific column If Target.Column = 27 Then 'don't do anything unless target contains something If Target.Value <> "" Then 'prevent changes made by this sub from triggering itself Application.EnableEvents = False 'insert below row of target Target.Offset(1).Resize(1, 12).Insert (xlShiftDown) 're-enable events Application.EnableEvents = True End If End If End Sub |
#3
|
||||
|
||||
Hi and welcome
in the future please use a title descriptive of your problem so that members can easily see what you are trying to do
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
Thread Tools | |
Display Modes | |
|