Results 1 to 6 of 6

is there a macro to delete empty rows?

Threaded View

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    22

    is there a macro to delete empty rows?

    Hi guys i know this is probably a simple thing but i don't seem to be able to find a solution anywhere, that is unless i look at third party software.

    what i am trying to do is delete all empty rows but leave individual cells in a populated row that are the result of the following group of macros

    Sub Contact_1()
    '
    ' Contact_1 Macro
    '
    
    '
        Range("I26:I32").Select
        Selection.Copy
        Range("M26:M32").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("M26:M32").Select
        Selection.Copy
        Sheets("Sheet6").Select
        Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
        Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=True
        Sheets("Sheet2").Select
        Range("B4").Select
    End Sub
    Sub Contact_2()
    '
    ' Contact_2 Macro
    '
    
    '
        Range("I34:I40").Select
        Selection.Copy
        Range("M34:M40").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("M34:M40").Select
        Selection.Copy
        Sheets("Sheet6").Select
        Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
        Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=True
        Sheets("Sheet2").Select
        Range("B4").Select
    End Sub
    Sub Contact_3()
    '
    ' Contact_3 Macro
    '
    
    '
        Range("I42:I48").Select
        Selection.Copy
        Range("M42:M48").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("M42:M48").Select
        Selection.Copy
        Sheets("Sheet6").Select
        Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
        Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=True
        Sheets("Sheet2").Select
        Range("B4").Select
    End Sub
    Sub Contact_4()
    '
    ' Contact_4 Macro
    '
    
    '
        Range("I50:I56").Select
        Selection.Copy
        Range("M50:M56").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("M50:M56").Select
        Selection.Copy
        Sheets("Sheet6").Select
        Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
        Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=True
        Sheets("Sheet2").Select
        Range("B4").Select
    End Sub
    i have uploaded an example of the file output.

    Hopefully this will make sense.
    Attached Files Attached Files
    Last edited by Poseidons-Palace; 10-23-2012 at 03:20 AM. Reason: Separated codes

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