delete row if given cell = 'X'

  • Thread starter Thread starter MSNews
  • Start date Start date
MSNews said:
Is there an easy way to do the above.

Thanks much

Carl

I'm not an expert but use data filter to select the rows, select and delete
them.

Try it with a trial sheet first though!

Peter
 
Several ways
1. data>filter>autofilter>filter on the x>delete
2. a looping macro from the bottom up

sub delifx()
for i=cells(rows.count,"a").end(xlup).row to 2 step -1
if lcase(cells(i,"a'))="x" then rows(i).delete
next i
end sub
 
Back
Top