Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear Named Ranges
Hi All, I have a number of named ranges on a spread sheet and need to
clear their values on exiting the spread sheet. Is it possible to "Clear all" ?? Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear Named Ranges
Sub clearum()
Dim n As Name For Each n In ActiveWorkbook.Names Range(n).Clear Next End Sub Note that the Name is really a string and therefore appears in the RANGE() argument -- Gary''s Student gsnu200709 "Les Stout" wrote: Hi All, I have a number of named ranges on a spread sheet and need to clear their values on exiting the spread sheet. Is it possible to "Clear all" ?? Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear Named Ranges
Via a loop.
Dim nme As Name For Each nme In ThisWorkbook.Names If Not nme.Name Like "*_FilterDatabase" And _ Not nme.Name Like "*Print_Area" And _ Not nme.Name Like "*Print_Titles" And _ Not nme.Name Like "*wvu.*" And _ Not nme.Name Like "*wrn.*" And _ Not nme.Name Like "*!Criteria" Then nme.Delete End If Next nme -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Les Stout" wrote in message ... Hi All, I have a number of named ranges on a spread sheet and need to clear their values on exiting the spread sheet. Is it possible to "Clear all" ?? Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear Named Ranges
Thanks very much for the input and code Gary's Student, much
appreciated... (I'm getting there):) Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
union of named ranges based only on the names of those ranges | Excel Programming | |||
Copy data in named ranges to a newer version of the same template to identical ranges | Excel Programming | |||
VBA Macro to Clear Named Cell Contents | Excel Programming | |||
Like 123, allow named ranges, and print named ranges | Excel Discussion (Misc queries) | |||
named ranges - changing ranges with month selected | Excel Programming |