PC Review


Reply
Thread Tools Rate Thread

Clear Named Ranges

 
 
Les Stout
Guest
Posts: n/a
 
      7th Mar 2007
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 ***
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      7th Mar 2007
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 ***
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      7th Mar 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 ***



 
Reply With Quote
 
Les Stout
Guest
Posts: n/a
 
      7th Mar 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Named ranges and pasting formulas with named references Dude3966 Microsoft Excel Programming 2 8th Oct 2008 04:15 PM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Microsoft Excel Programming 3 24th Dec 2007 01:15 PM
Copy data in named ranges to a newer version of the same template to identical ranges handstand Microsoft Excel Programming 0 21st Aug 2006 03:51 PM
Like 123, allow named ranges, and print named ranges =?Utf-8?B?V1A=?= Microsoft Excel Misc 1 8th Apr 2005 06:07 PM
Excel2000: Is it possible to use named ranges as chart's series ranges Arvi Laanemets Microsoft Excel Misc 8 11th Jul 2004 06:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:35 PM.