Consulting

Results 1 to 2 of 2

Thread: Solved: Instruct Insert Row Above...

  1. #1

    Solved: Instruct Insert Row Above...

    My Code inserts a new row and then performs its copy to this row. What I need it to do rather is to insert the row above and copy there.
    I am not sure how to address this.



    [vba]
    For i = Cells(Rows.Count, "D").End(xlUp).Row To 3 Step -1
    If Cells(i, "D") = "Insert" Then
    Cells(i, "D").EntireRow.Insert
    Cells(i + 1, "D").EntireRow.Copy Destination:=Cells(i, 1)
    Cells(i + 1, "D").Formula = "=IF(LEFT(W" & i + 1 & ",2)=""~P"",""""," & _
    "IF(AND(LEFT(W" & i + 1 & ",2)=""~C"",LEFT(U" & i + 1 & ",8)<>" & _
    "LEFT(U" & i & ",8)),""Insert"",""""))"
    Cells(i + 1, "D").Copy Destination:=Cells(i, "D")
    Cells(i + 1, "N").ClearContents
    Cells(i + 1, "Z").Value = 0
    Cells(i + 1, "AC").Value = 1998
    End If

    [/vba]

    Any ideas?

    Thanks,
    YLP

  2. #2
    Please Disregard. I am doing some further research.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •