Closed Thread
Results 1 to 2 of 2

"if cell contains text Insert row below" coding works the opposite

  1. #1
    Registered User
    Join Date
    11-25-2012
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2010
    Posts
    4

    "if cell contains text Insert row below" coding works the opposite

    hi i am new to this forum. found some great solutions and thought of posting my specific issue. i am also very new to VBA.

    i am creating a payment tracker table on excel. when a specific text is entered in either column' E, H or K like "Doc. Incomplete" i want to automatically insert a row below.

    Ex: Row 7 has multiple conditional formatting and formulas. if users enters Doc. "Incomplete" in E7 a new row (8) to be inserted copying all of Row 7's formatting and formula

    in another thread i found a coding and modified it as follows

    Private Sub Worksheet_Change(ByVal Target As Range)
    With Target
    If .Column = 5 Or 8 And .Text = "Doc. Incomplete" Then
    ActiveCell.EntireRow.Insert Shift:=-x1Down
    End If
    End With
    End Sub


    This coding somehow inserts a row above the row instead of below. it does not copy the formula either.
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: "if cell contains text Insert row below" coding works the opposite

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    HTH
    Regards, Jeff

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1