+ Reply to Thread
Results 1 to 7 of 7

Clear Contents of multiple pages in my workbook

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    94

    Clear Contents of multiple pages in my workbook

    Do I need to use a macro/VBA to automatically clear the contents of multiple pages. Is there an easy way to accomplish this I should say. Every month I clear about 20 pages worth of data and it would be easier to clear all the cells at once. Any help? Thanks.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Clear Contents of multiple pages in my workbook

    Yeah, a small macro should do your work.

    What do you want to be done exactly? Just clear the contents of all the sheets in your file? Should the headers be left intact?

    Is it only for one file or multiple files in a folder?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Clear Contents of multiple pages in my workbook

    How can I know what are the pages to be deleted ? to delete all on sheet(1)
    sheet(1).cells.clearcontents
    If solved remember to mark Thread as solved

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Clear Contents of multiple pages in my workbook

    You can do this manually.

    Select the first sheet in the workbook, then while holding down SHIFT select the last sheet.

    Then select all the cells on the active sheet by clicking in the top left.

    Finally hit DELETE.

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: Clear Contents of multiple pages in my workbook

    I would like to clear all the contents on 20 tabs of one worksheet. I would like to leave headers intact. Any recommendation for a small macro?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Clear Contents of multiple pages in my workbook

    Try this
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button

  7. #7
    Registered User
    Join Date
    10-15-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: Clear Contents of multiple pages in my workbook

    Worked Great!! Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1