Como posso apagar células vazias na minha planilha? Hã! Segue:
Sub Del_Empty_Rows()Dim R As Long
Dim rng As Range
Let Application.ScreenUpdating = False
If Selection.Rows.Count > 1 Then
Set rng = Selection
Else
Set rng = ActiveSheet.UsedRange.Rows
End If
For R = rng.Rows.count To 1 Step -1
If WorksheetFunction.CountA(rng.Rows(R).EntireRow) = 0 Then
rng.Rows(R).EntireRow.Delete
End If
Next R
Let Application.ScreenUpdating = TrueEnd Sub
Reference:
Inspiration:
Tags: VBA, Excel, delete, cells, cell, apaga, célula
Nenhum comentário:
Postar um comentário