Como posso apagar células vazias na minha planilha?
Sub Del_Empty_Rows()Dim R As LongDim rng As RangeApplication.ScreenUpdating = FalseIf Selection.Rows.Count > 1 ThenSet rng = SelectionElseSet rng = ActiveSheet.UsedRange.RowsEnd IfFor R = rng.Rows.count To 1 Step -1If WorksheetFunction.CountA(rng.Rows(R).EntireRow) = 0 Thenrng.Rows(R).EntireRow.DeleteEnd IfNext RApplication.ScreenUpdating = TrueEnd Sub
Reference:
Inspiration:
Tags: VBA, Excel, delete, cells, cell, apaga, célula