View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
K[_2_] K[_2_] is offline
external usenet poster
 
Posts: 557
Default Delete Entire Row

Hi all, I have macro to delete Entire Rows the one have "X" in column
A (see macro below).

Sub DelRow()
Dim c As Range
For Each c In Range("A1:A500").Cells
If c.Value = "X" Then
c.EntireRow.Delete
End If
Next c
End Sub

The problem I am having that macro don’t delete all those rows the one
have character "X" in column A. I have to run macro more than one
time to delete all rows. Please can any friend can help that how can
I achive my goal just running macro once.