+ Reply to Thread
Results 1 to 2 of 2

Macro code for deleting empty rows in the output worksheet

  1. #1
    Registered User
    Join Date
    08-30-2015
    Location
    chicago
    MS-Off Ver
    2007
    Posts
    32

    Macro code for deleting empty rows in the output worksheet

    Removing Blank rows
    Last edited by macrolearnerkk; 09-07-2015 at 02:55 PM.

  2. #2
    Registered User
    Join Date
    08-30-2015
    Location
    chicago
    MS-Off Ver
    2007
    Posts
    32

    Re: Macro code for deleting empty rows in the output worksheet

    Code:

    http://www.excelforum.com/excel-prog...el-2010-a.html

    PHP Code: 
    Sub DelRows()
        
    Application.ScreenUpdating False
        Dim ws 
    As Worksheet
        Dim LastRow 
    As Long
        Dim response 
    As String
        response 
    InputBox("Please enter search string.")
        For 
    Each ws In Sheets
            LastRow 
    ws.Cells.Find("*"SearchOrder:=xlByRowsSearchDirection:=xlPrevious).Row
            ws
    .Range("A1:E" LastRow).AutoFilter Field:=1Criteria1:=response
            ws
    .Range("A2:E" LastRow).SpecialCells(xlCellTypeVisible).EntireRow.Delete
            ws
    .AutoFilterMode False
        Next ws
        Application
    .ScreenUpdating True
    End Sub 
    Last edited by macrolearnerkk; 09-07-2015 at 02:57 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. EXCEL VBA deleting empty rows code with formulas
    By superdonk in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-31-2014, 12:09 PM
  2. Code/Macro for deleting empty columns and rows.
    By gautamacharya in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-09-2014, 01:49 PM
  3. [SOLVED] Deleting empty rows in excel using macro
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2013, 02:40 AM
  4. [SOLVED] Worksheet Macro that hides empty rows does not work
    By Taktiker in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-22-2012, 11:11 AM
  5. Deleting empty rows if specific cell in row is empty
    By csynic in forum Excel General
    Replies: 0
    Last Post: 07-06-2011, 01:43 AM
  6. Autofilter/delete empty rows is deleting non-empty rows!
    By oOarthurOo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2010, 12:31 PM
  7. Deleting empty rows in a worksheet
    By danw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2006, 04:50 PM

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