VBA Code to delete blank Rows

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,595
I need VBA code that will delete all blank rows in column A

Your assistance will be most appreciated
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

gsbelbin

Active Member
Joined
Aug 29, 2008
Messages
336
Do you really need a macro? This can be done with just a few mouse clicks (Edit, Go To, Special, Blanks, Edit, Delete, Entire Row)
 

prabby25101981

Active Member
Joined
Jul 28, 2010
Messages
348
Does this help?

Code:
Sub deleteblankrows()
Dim LRow As Long
LRow = Range("A65536").End(xlUp).Row
For i = LRow To 2 Step -1
    If Range("A" & i).Value = "" Then
        Range("A" & i).EntireRow.Delete
    End If
Next i
End Sub
 

gsbelbin

Active Member
Joined
Aug 29, 2008
Messages
336
Do you really need a macro? This can be done with just a few mouse clicks (Edit, Go To, Special, Blanks, Edit, Delete, Entire Row)
If you really want a macro the code below does what I've described previously.

Code:
    Columns("A:A").Select
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.EntireRow.Delete
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,938
Messages
5,508,228
Members
408,670
Latest member
lhmwnrexcel

This Week's Hot Topics

Top