Deleting content from multiple sheets excluding the headings of the content

abhijit781

New Member
Joined
Jun 29, 2010
Messages
17
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
I need a help regarding a macro for one of my reports. I have a excel sheet with some tabs. Every time I’m generating a report I have to delete the content of all the tabs from previous report excluding the headings. For example I have a sheet with 3 tabs Jan, Feb and Mar.I want content of the each tab to be deleted but not the headings(i.e. the 1st row should not be deleted).
I’m able to delete the content by a macro but not able to do at a time for all the 4 sheets. Could anyone please help me out?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try this:
Code:
    Dim ws As Worksheet
    For Each ws In Worksheets
        ws.UsedRange.Offset(1, 0).Delete
    Next
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top