Macro that Deletes All rows except first row

C

curtney

Greetings everyone!

How can I delete all rows in an excel sheet except the first row?

I have an excel sheet where the first row has header information and
the subsequent rows contains data. I would like to run a vba macro that
clears/delete all the data , starting from row 2, in the excel sheet but
retains the header information in row 1.

Curtney Jacobs
 
C

curtney

Thanks, that did the trick! All the rows get deleted from row 2
onwards!

Is there a way to reset the active cell back to the second row after
deletion? Meaning the active row/cell should be the second row again.

Thanks,

Curtney
 

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