Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determining if a named range exists
Hello,
Is there a way to determine whether a named range exists in a workbook? I would think there would be a way. I'm trying to put together an if statement - but I don't know the syntax. What I'm looking for is "If the range "first" exists in the workbook, then do this, else . . ." Any help would be greatly appreciated. Thanks in advance. Anita |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determining if a named range exists
Sub RangeNameTes()
Dim rng As Range On Error Resume Next Set rng = Range("myRangeNAme") On Error GoTo 0 If Not rng Is Nothing Then ' it exists Else ' it doesn't exist End If End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "a" wrote in message nk.net... Hello, Is there a way to determine whether a named range exists in a workbook? I would think there would be a way. I'm trying to put together an if statement - but I don't know the syntax. What I'm looking for is "If the range "first" exists in the workbook, then do this, else . . ." Any help would be greatly appreciated. Thanks in advance. Anita |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determining if a named range exists
Bob,
Thanks! Anita Bob Phillips wrote: Sub RangeNameTes() Dim rng As Range On Error Resume Next Set rng = Range("myRangeNAme") On Error GoTo 0 If Not rng Is Nothing Then ' it exists Else ' it doesn't exist End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Validate Named Range Exists | Excel Programming | |||
Determining whether a named textbox on a chart exists | Excel Programming | |||
how to tell if a named range exists | Excel Programming | |||
Determining if a Worksheet Exists | Excel Programming | |||
easy way to test if a Named Range exists | Excel Programming |