ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hi Guys... (https://www.excelbanter.com/excel-programming/305053-re-hi-guys.html)

kiza[_13_]

Hi Guys...
 
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 Su

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


Don Guillett[_4_]

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/





All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com