XLS S, I would tend to believe that progressing from small to large indices for a row will not solve the problem.
A more conservative approach would be the classic reverse look that looks like this Sub DelRowWithZeroes() Dim lngLoop As Long With Worksheets("Sheet1").Range("P3:P13") For lngLoop = .Rows.Count To 1 Step -1 If .Cells(lngLoop).Value = 0 Then .Cells(lngLoop).EntireRow.Delete End If Next lngLoop End With End Sub Also, for posterity, please note that Excel 2007 and upper versions do not allow the use of Keywords like Add, Sort, Delete as names for Sub- procedures. On Jul 28, 9:30 pm, XLS S <xlst...@gmail.com> wrote: > Sub Delete() > On Error Resume Next > With Range("A1:A5") > .EntireRow.Hidden = False > For i = 1 To .Rows.Count > If WorksheetFunction.Sum(.Rows(i)) = 0 Then > .Rows(i).EntireRow.Delete = True > End If > Next i > End With > End Sub > > > > > > > > > > On Thu, Jul 28, 2011 at 9:54 PM, Prabhu <prabhugate...@gmail.com> wrote: > > Hi Friends, > > > I Required Macro code if we find zero(0) in a particular row then we need > > to delete entire row. > > > Example: In"P' column P27,48,57 cells contain 0 then entire 27,48,57th row > > needs to delete from the sheet. > > > Plz help > > > Regards, > > > Prabhu > > > -- > > > ---------------------------------------------------------------------------------- > > Some important links for excel users: > > 1. Follow us on TWITTER for tips tricks and links : > >http://twitter.com/exceldailytip > > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310 > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > > > <><><><><><><><><><><><><><><><><><><><><><> > > Like our page on facebook , Just follow below link > >http://www.facebook.com/discussexcel > > -- > ......................... -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel