Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
checking if a range has a name.
Hello everyone,
Let's say I have given the name "automobile" to cell B7. If that cell is selected at a certain moment, is is possible to retrieve the name "automobile" that has been given to it? I'd like to do something along the lines of (free styling) : if the name of the active cell = "automobile" then .... etc. etc. Does anyone have code for this kind of thing? Thanks, Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
checking if a range has a name.
Maybe:
Option Explicit Sub testme() Dim myName As String myName = "" On Error Resume Next myName = ActiveCell.Name.Name On Error GoTo 0 If myName = "" Then MsgBox "no name" Else MsgBox "It's: " & myName End If End Sub Peter wrote: Hello everyone, Let's say I have given the name "automobile" to cell B7. If that cell is selected at a certain moment, is is possible to retrieve the name "automobile" that has been given to it? I'd like to do something along the lines of (free styling) : if the name of the active cell = "automobile" then .... etc. etc. Does anyone have code for this kind of thing? Thanks, Peter -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checking a cell against a named range | Excel Worksheet Functions | |||
Checking a range with IF | Excel Discussion (Misc queries) | |||
Checking if a certain day falls in a range | Excel Discussion (Misc queries) | |||
Checking ALL values in a range | Excel Discussion (Misc queries) | |||
Checking range names | Excel Programming |