Am having a slight malfunction with this line of codes. I intend for this code to loop and delete rows of which either cells in column A or cells in column B is empty.. This rows contains Clients Names in Column A and The Clients Number in Column B. Now when i execute the script, the first row deletes fine, but from the next row which ought to delete, the phone number begins to mix up.
Please, i just need the argument to be written in such a way it fetches all row which are true according to the conditions and delete, or any logic which might work, without mixing up datas Thank You.
NOTE: I would appreciate if correction or upgrade is done using my code below. Thank you
Dim rngRange As Range
Dim rngUnion As Range
Dim rngCEll As Range
Set rngRange = Sheet2.UsedRange.Offset(7)
For Each rngCEll In rngRange.Columns(1).Cells
If rngCEll.Value = "" Or rngCEll.Offset(, 1).Value = "" Then
If rngUnion Is Nothing Then
Set rngUnion = rngCEll
Else
Set rngUnion = Union(rngUnion, rngCEll)
End If
End If
Next rngCEll
If Not rngUnion Is Nothing Then
rngUnion.EntireRow.Delete
End If