Dear Arpit, please try below code..it will be help to delete all row of J column............
Sub delete_row() Dim i, j As Long Application.ScreenUpdating = False j = Application.WorksheetFunction.CountA(Sheet22.Range("J:J")) For i = j To 1 Step -1 If Sheet22.Cells(i, 10).Value = 0 Then Sheet22.Range("J" & i).EntireRow.Delete End If Next i Application.ScreenUpdating = True End Sub -- Thanks & regards, Noorain Ansari *http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/> On Thu, Jul 28, 2011 at 4:59 PM, arpit rajput <arpit.raj...@gmail.com>wrote: > Thanks Noorain for your quick respond. > > It will not delete all rows properly at one time, about 50% 0 values row > penidng at the time of appling logic first time. i made some change but its > going hang. can you please modify it..... > > Sub delete_row() > dim i,j as long > application.screenupdating=false > j=application.worksheetfunction.counta(sheet22.range("J:J")) > for i=1 to j > if sheet22.cells(i,10).value=0 then > sheet22.range("J"&i).EntireRow.Delete > i= i-1 > else > i= i+1 > end if > next i > application.screenupdating=true > End Sub > > > > On Thu, Jul 28, 2011 at 4:01 PM, NOORAIN ANSARI > <noorain.ans...@gmail.com>wrote: > >> Dear Arpit, >> >> Please try below code to delete row equal to 0 in J Column...... >> >> Sub delete_row() >> dim i,j as long >> application.screenupdating=false >> j=application.worksheetfunction.counta(sheet22.range("J:J")) >> for i=1 to j >> if sheet22.cells(i,10).value=0 then >> sheet22.range("J"&i).EntireRow.Delete >> end if >> next i >> application.screenupdating=true >> End Sub >> >> >> -- >> Thanks & regards, >> Noorain Ansari >> *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/> >> >> >> On Thu, Jul 28, 2011 at 2:50 PM, arpit rajput >> <arpit.raj...@gmail.com>wrote: >> >>> Hi Experts, >>> >>> >>> >>> I want to remove entire row when each cell value =0 in column J see in >>> attached file. >>> >>> Anybody suggest me VBA code to delete all 0 value rows. >>> >>> >>> >>> Thanks >>> >>> ARPIT KUMAR >>> >>> -- >>> >>> ---------------------------------------------------------------------------------- >>> 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 >>> >> >> >> >> -- >> >> ---------------------------------------------------------------------------------- >> 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 >> > > -- > > ---------------------------------------------------------------------------------- > 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 > -- ---------------------------------------------------------------------------------- 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