LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default how to tell if a named range exists

hi all,

in vba - how do you tell if a named range exists?

and whats the easiest way to create a named range

now i am doing:

Dim l As Range
ActiveWorkbook.Names("LastUsed").Delete
l = .Cells(Cells.Rows.Count, "C").End(xlUp)(2)
ActiveWorkbook.Names.Add name:="LastUsed", _
RefersToR1C1:="='Customer Orders'!R" & l.Row & "C" & l.Column

is there a better way to do this?

tia

J
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to lookup if value exists in a range of data? S.elhalaby Excel Worksheet Functions 3 May 5th 23 07:43 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Check if a number exists in a range? gkaste Excel Discussion (Misc queries) 2 July 13th 05 08:00 PM
within a macro how can I suppress the warning pop "A file named xxxx.xls already exists in this location. Do you want to replace it?" Pete McCosh Excel Programming 0 April 2nd 04 04:51 PM
easy way to test if a Named Range exists Andrew Bauer Excel Programming 4 July 10th 03 07:32 PM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"