Views

Histats

Vitrine

Macro Excel - Deletando Linhas em branco - Delete Empty Rows

Inline image 1


Deletando linhas em branco...

Marque o bloco de linhas que deseja apagar

Sub Del_Empty_Rows()
Dim R As Long
Dim rng As Range
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
 
Application.ScreenUpdating = True
End Sub


Tags: Macros, Excel, row, dell, delete, line, linha

LinkWithinBrazilVBAExcelSpecialist

Related Posts Plugin for WordPress, Blogger...