Results 1 to 2 of 2

Delete blank row above cells with specific words.

Threaded View

  1. #1
    Registered User
    Join Date
    11-17-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    1

    Delete blank row above cells with specific words.

    This code works well to insert a row. But what I want is to reserve the code to delete the row instead of insert.

    Sub InsertRows()
    Dim i As Long
    i = 2
    Do Until Trim(Cells(i, 1)) = ""
    If Cells(i, 1) = "Total" Then
    Cells(i, 1).EntireRow.Insert
    i = i + 2
    Else
    i = i + 1
    End If
    Loop
    End Sub
    Thanks,
    Brianne

    Moderator's Edit: Use code tags when posting code. To do so in future, select your code and click on the # icon at the top of your post window.
    Last edited by arlu1201; 11-17-2012 at 02:14 AM.

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