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 |
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