Delete off all blank rows in a spreadsheet

  • Re: Delete off all blank rows in a spreadsheet


    hi,
    try this
    Public Sub DeleteRowOnCell()
    Columns("G:G").Select
    On Error Resume Next
    Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
    ActiveSheet.UsedRange
    Range("A1").Select
    End Sub


    this worked for me.
    Arun Prathiba

  • Re: Delete off all blank rows in a spreadsheet


    Try this... I'm assuming if any cells in column A are empty, then entire row is empty,


    Code
    Set tempRange = Range("A1",Range("A65000").End(xlUp)).SpecialCells(xlCellTypeBlanks)
    
    
    With tempRange
        .EntireRow.Delete shift:=xlUp
    End With
  • Re: Delete off all blank rows in a spreadsheet


    Quote from tradertt

    How can I delete all blank rows in a spreadsheet without sorting the data as I want it to be in the exact order it is in.


    How is it sorted now?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!