+ Reply to Thread
Results 1 to 6 of 6

Determine what Named Range the Target Address is and return Named Range Name

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Question Determine what Named Range the Target Address is and return Named Range Name

    Hi Guys,

    is there a function to return the name of a named range (if it exists) of the Target.Address?

    Regards

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Determine what Named Range the Target Address is and return Named Range Name

    Hello jordan2322,

    No there is not. But one could be written using VBA.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Determine what Named Range the Target Address is and return Named Range Name

    Something like this?
    How would i modify this such that the target.address only needs to be within the named range - not match the named range address exactly.
    As the named ranges are more than a single cell this (as written in the code below) would be impossible as the user can only double click a single cell not a range.
    (note: I want this to be called using the double click event)

    Please Login or Register  to view this content.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Determine what Named Range the Target Address is and return Named Range Name

    Try this

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Determine what Named Range the Target Address is and return Named Range Name

    Please Login or Register  to view this content.
    Solved using the above. Thank you Mikerickson for your reply!

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Determine what Named Range the Target Address is and return Named Range Name

    What happens if the cell you click on is in more than one named range? Do you want all named ranges that contain the double clicked cell to appear?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1