Views

Histats

Vitrine

VBA Excel - Apague células vazias - Delete Empty Rows

Inline image 1
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 = True
End Sub

Reference:

Inspiration:

Tags: VBA, Excel, delete, cells, cell, apaga, célula

✔ VBA Brazil®

✔ VBA Brazil®
brazilsalesforceeffectiveness@gmail.com
Related Posts Plugin for WordPress, Blogger...
diHITT - Notícias