+ Reply to Thread
Results 1 to 6 of 6

Identify which named range(s) ActiveCell intersects

  1. #1
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Question Identify which named range(s) ActiveCell intersects

    Hello,

    I am trying to write some code to identify which, if any, named range(s) the active cell intersects. I have tried multiple methods and keep getting stuck...

    The end goal is to create a change log but for now I just need to identify the names of the ranges being changed.

    So far:
    Please Login or Register  to view this content.
    This code currently does not display any message whatsoever when I make a change to the sheet. Prior to deleting the Print_Area named range, it would always tell me I'm in the print area range and nothing else. Does anyone know why this is happening or a faster way to identify the named ranges the target intersects? Thank you.
    Last edited by yay_excel; 10-25-2011 at 12:31 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Identify which named range(s) ActiveCell intersects

    This seems to work. For some reason you need to add the reference to activeworkbook for it to work:
    Please Login or Register  to view this content.
    Edit: this may fall down if you have named ranges on other sheets.

  3. #3
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Re: Identify which named range(s) ActiveCell intersects

    Thank you Stephen. This does not work though unfortunately as I do have named ranges on nearly every sheet in the workbook. I tried experimenting with sheet names and a bunch of stuff yesterday but had no luck. The closest I got was displaying the name of the named range for the active cell on every sheet in the workbook. I only want the active sheet's active cell though. Hmmmm I will keep trying.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Identify which named range(s) ActiveCell intersects

    I will have a look at this again, I was a bit rushed earlier and couldn't understand why some of things I tried didn't work.

  5. #5
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Re: Identify which named range(s) ActiveCell intersects

    SUCCESS.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Identify which named range(s) ActiveCell intersects

    Does this work?
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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