24 | 05 | 2017

Delete Empty Rows

 Code below deletes empty rows.

Sub DeleteEmptyRows()
 
'****************************************
'*** Code from VisibleVisual.com ********
'****************************************
Rng = Selection.Rows.Count
ActiveCell.Offset(0, 0).Select
Application.ScreenUpdating = False
For i = 1 To Rng
If ActiveCell.Value = "" Then    'Or use = 0 to delete rows with the zero value
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Next i
Application.ScreenUpdating = True
 
End Sub
Login

Sign up now and upload your code to the website.

Help us to continue.....
Statistics
Articles View Hits
2258997
Latest Articles