Results 1 to 7 of 7

Deleting a row with empty cells

Threaded View

Stevekag Deleting a row with empty... 07-28-2011, 07:36 PM
Mordred Re: Deleting a row with empty... 07-28-2011, 08:00 PM
Trebor76 Re: Deleting a row with empty... 07-28-2011, 08:06 PM
Stevekag Re: Deleting a row with empty... 07-28-2011, 08:21 PM
kwg2200 Re: Deleting a row with empty... 07-28-2011, 08:22 PM
kwg2200 Re: Deleting a row with empty... 07-28-2011, 08:28 PM
Stevekag Re: Deleting a row with empty... 07-28-2011, 08:33 PM
  1. #1
    Registered User
    Join Date
    07-28-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Deleting a row with empty cells

    Can anyone help me. I have a spreadsheet that is about 5000 rows long. I need a macro that will search the selection (A9:E5000) look for empty cells and delete the row.
    Not as it happens but after initiating the macro. Here is what i was using but it is not working.
    Sub DeleteBlankRows2()
    
    'Deletes the entire row within the selection if _
    
    some of the cells WITHIN THE SELECTION contain no data.
    
    On Error Resume Next
    
    Selection.EntireRow.SpecialCells(xlBlanks).EntireRow.Delete
    
    On Error GoTo 0
    
    End Sub
    Last edited by Leith Ross; 07-28-2011 at 08:38 PM. Reason: Added Code Tags

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