Modify some Walkenbach (ClearContents Macro)
Eliminate Pivot Table Annoyances
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Modify some Walkenbach (ClearContents Macro)

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    88
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I need a macro to clear contents of a specific range named "values". I got this from Walkenbach:

    Cells.SpecialCells(xlCellTypeConstants), 23).Clearcontents

    This works and even keeps my formatting intact but it clears ALL cells in the sheet (except formulas) - problem is that it clears my headers and labels too.. So I took all my "value" cells and named them "Values" and now I need to modify the code to just ClearContents on that range name..

    Thanks in advance!

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    88
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Figured it out myself if anyone was keeping up... Wasn't able to edit the Walkenbach but it was even easier...

    Range("values").Select
    Selection.ClearContents
    Range("C5").Activate

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com