Excel VBA Check if a cell is named

Hi

What Excel VBA would I use to check if a single cell is also a named range?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
Hi,

pls try

Sub macro()
On Error Resume Next
Set cellName = ActiveCell.Name
On Error GoTo 0
If Not IsEmpty(cellName) Then
    MsgBox "ActiveCell has name: " & cellName.Name
End If
End Sub

Open in new window

Regards
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.