Dazzawm
Well-known Member
- Joined
- Jan 24, 2011
- Messages
- 3,786
- Office Version
- 365
- Platform
- Windows
I have used my limited knowledge of VBA and put this code together from various sources. It seems to do what I need it to do, by looking in column C and whenever there is a blank cell it deletes the entire row.
Would someone please explain each step for me please so I can get my head around it and aid my learning.
Thanks
Would someone please explain each step for me please so I can get my head around it and aid my learning.
Thanks
Code:
Sub test()
Application.ScreenUpdating = False
Dim a As Integer
Dim b As Integer
Range("c1").Select
a = ActiveCell.CurrentRegion.Rows.Count
For b = 1 To a
If Selection.Value = "" Then
Selection.EntireRow.Delete
Else
Selection.Offset(1, 0).Select
End If
Next b
Range("A1").Select
Application.ScreenUpdating = True
End Sub