I am trying to delete all the empty rows in a range. What I currently have deletes the rows but skips over a lot as the code runs. Below is what I currently have.
Code:
'msgbox delete blanks???
If MsgBox("Are you sure you want to delete ALL the blank rows in the chart?", vbYesNo, "Delete Blanks?") = vbNo Then
Exit Sub
Else
''''***PCrng is named range = A2:A1000***
For Each cell In Range("PCrng")
If cell.Value = "" Then
Set rng2 = cell.Offset(0, 3)
Range(cell.Offset(0, -1), rng2).Select
Selection.EntireRow.Delete
Else
End If
Next cell
Range("a1").Select
MsgBox "There are no more results for " & myItem
Exit Sub
End If
End Sub