+ Reply to Thread
Results 1 to 5 of 5

Selected Cell within named range?

  1. #1
    Registered User
    Join Date
    11-26-2008
    Location
    San Francisco
    Posts
    33

    Selected Cell within named range?

    I'm hoping this question is very easy for the experienced Excel/VBA developers on this forum.

    I want to use the Worksheet SelectionChange event to update part of my worksheet/UI depending on what cell(s) the user has selected.

    As an example, if I have two named ranges - $A$1:$B$10 and $C$1:$D$10 - I want to detect whether the user is in range 1, range 2, or neither, then update elements of the UI.

    How can I find out if the Target range is within one of the other ranges?
    Last edited by negcx; 12-23-2008 at 09:04 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    Selected Cell within named range?

    Try something like assuming your names ranges are called "range1" and "range2"(not sure if you want to have this in the selection change or the worksheet change..) :

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-26-2008
    Location
    San Francisco
    Posts
    33
    Thanks gentlemen - knew there had to be something simple.

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387
    negcx,

    Please Login or Register  to view this content.

    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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