![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 88
|
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 |
|
Board Regular
Join Date: Mar 2002
Posts: 88
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|