Thread: Hi Guys...
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Hi Guys...

OR, without selections. Some confusion here about Col A and colindx 4.??

sub dr()
x=cells(rows.count,4).end(xlup).row
for i=x to 1 step -1
if cells(i,4)=0 then rows(i).delete
next i
end sub
--
Don Guillett
SalesAid Software

"kiza " wrote in message
...
The answer could be as shown below:


Sub Delete_Rows()
'
Dim rwIndex, ColIndex
'
rwIndex = 1
ColIndex = 4
Do Until Range("A" & rwIndex) = ""
Cells(rwIndex, ColIndex).Select
If ActiveCell = 0 Then
Selection.EntireRow.Delete
End If
rwIndex = rwIndex + 1
Loop
Range("A1").Select
End Sub


---
Message posted from
http://www.ExcelForum.com/