delete row if given cell = 'X'

P

Peter Andrews

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
 
D

Don Guillett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top