View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Clear all rows except first two

Range("3:65536").ClearContents
'Assumes normal worksheet size

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Paul Kraemer" wrote:

Hi,

I am using Excel 2007. I want to write a VBA Subroutine to delete/clear all
data on a particular worksheet except for the first two rows.

This worksheet can have any number of rows filled with data. Can anyone
give me a hint on how I can select and clear all rows containing data except
for the first two rows?

Thanks in advance,
Paul
--
Paul Kraemer