Code for Deleting all but first row

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I have a large data file that changes daily. I have a header row and am using
a filter to copy certain data including the header row to a new worksheet. I
want to then go back and delete all the data that was displayed by the filter
except for the Header row. Does anyone know the code that can do this??
 
range(Range("B1"), cells(rows.count,
columns.count)).specialcells(xlCellTypeVisible).entirerow.delete
 
Thanks Jim. That works great!!

Jim Thomlinson said:
range(Range("B1"), cells(rows.count,
columns.count)).specialcells(xlCellTypeVisible).entirerow.delete
 

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

Back
Top