Olá pessoal!
Segue um código, simples, honesto, rápido e limpinho.
Private Sub Worksheet_Change (ByVal Target As Range) 'Deleta todas as linhas que estiverem em branco que existirem. 'Previne loops infinitos Let Application.EnableEvents = False 'Caso haja mais de uma célula selecionada. If Target.Cells.Count > 1 Then GoTo SelectionCode If WorksheetFunction.CountA(Target.EntireRow) = 0 Then Target.EntireRow.Delete End If Let Application.EnableEvents = True Exit Sub SelectionCode: If WorksheetFunction.CountA(Selection.EntireRow) = 0 Then Selection.EntireRow.Delete End If Let Application.EnableEvents = True End Sub
Tags: Bernardes, MS, Microsoft, Office, Excel, Rows, Lines, blank, removing, EntireRow, automatically
André Luiz Bernardes
A&A® - Work smart, not hard.Skype: inanyplace