+ Reply to Thread
Results 1 to 6 of 6

Cell in named range

  1. #1
    Forum Contributor
    Join Date
    11-03-2009
    Location
    Florida
    MS-Off Ver
    Excel 365
    Posts
    289

    Cell in named range

    Is there a way to determine if a cell is part of one or more named ranges?
    Thanks

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Cell in named range

    One possible way would be to use VBA. The example code below will loop through the named ranges and see if the selected cell appears anywhere within a named range and will throw up a message box with the name of the range if it does.
    You could change Selection to a specific range if that would work better. Not much info to go on...

    Please Login or Register  to view this content.
    BSB

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Cell in named range

    Hi there,

    Take a look at the attached workbook and see if it does what you need. It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Cell in named range

    Hi again,

    Following on from BSB's approach, the attached workbook will check for intersections with ALL of the named ranges contained in a workbook. It uses the following code:

    Please Login or Register  to view this content.

    Hope this helps,

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    11-03-2009
    Location
    Florida
    MS-Off Ver
    Excel 365
    Posts
    289

    Re: Cell in named range

    Thank you all, I appreciate it.

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Cell in named range

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated!

    You're welcome - glad I was able to help.

    Best regards,

    Greg M

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 10-28-2019, 04:14 PM
  2. Listbox displaying named range B but Adding named range A to cell
    By ikkenieikke in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-05-2018, 02:27 PM
  3. [SOLVED] Assign named range to one cell depending on named range in another
    By x65140 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2015, 11:04 AM
  4. [SOLVED] determining if cell is part of named range and what that named range is
    By stnkynts in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2014, 07:56 PM
  5. [SOLVED] Determining if the value of a cell can be a named range, then assigning named ranges after
    By Romulo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2013, 06:05 PM
  6. Replies: 1
    Last Post: 06-03-2006, 10:55 PM
  7. If any cell in named range = 8 then shade named range
    By JJ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-26-2005, 07:05 PM

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