try this code assuming you have data in col a to col c and you want to delete all records with #n/a in col C
Sub TEST() Application.Calculation = xlCalculationManual Application.ScreenUpdating = False If Sheets(1).FilterMode Then Sheets(1).ShowAllData End If Sheets(1).Range("A1:C" & Range("A1").End(xlDown).Row).AutoFilter Field:=3, Criteria1:="#N/A" Sheets(1).Range("A2:C" & Range("A1").End(xlDown).Row).SpecialCells(xlCellTypeVisible).EntireRow.Delete If Sheets(1).FilterMode Then Sheets(1).ShowAllData End If Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True End Sub On Fri, Apr 15, 2011 at 3:59 PM, Prabhu <prabhugate...@gmail.com> wrote: > Macro Help in Excel 2007? > > I want to delete particular rows only in my work sheet which contains #N/A > in a particular column? > > Assuming the column containing the #N/A errors is column A, and i need to > delete the entire row where '#N/A' if found in column A. > > Plz help with macro code which should delete enter #N/A at one time not > line by line. > > 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 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 > -- *Regards* * * *Ashish Koul* *akoul*.*blogspot*.com <http://akoul.blogspot.com/> *akoul*.wordpress.com <http://akoul.wordpress.com/> My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830> P Before printing, think about the environment. -- ---------------------------------------------------------------------------------- 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