+ Reply to Thread
Results 1 to 10 of 10

Cell Multiple Named Ranges

  1. #1
    Forum Contributor
    Join Date
    01-09-2012
    Location
    Rochester Hills, United States
    MS-Off Ver
    Excel 2010
    Posts
    161

    Cell Multiple Named Ranges

    I have a cell in my worksheet that is defined by multiple named ranges.

    E.G. Some cell - A1 - has a named range called CellExists and it is also defined by a range CheckBox.

    Cell exists is solely for that cell whereas CheckBox is used for a macro that, when the cell is double-clicked, will be replaced with an "X". The named range CheckBox is also pointing to several other cells (as it seems pertinent to have a specific function defined by a single range) and the other cells seem to work when double-clicked (meaning they are filled with an "X" when I double-click them). The only common denominator I can find here is that my cell that doesn't work has two named ranges in it.

    I then deleted any other definitions for that given cell and left only the CheckBox named range to define it and it still wouldn't work.

    Are there any other factors that might affect a cell's double-click event?

    Thanks for any help!

    (I'm hoping someone might have an answer based on a similar experience, but if not I can upload my workbook - I just have to take company information out which is a pain)

    ************************************

    [SOLVED]


    Quote Originally Posted by JosephP View Post
    that cell is part of the ListIndex0 range so is handled by the first part of your code (which is not what you posted) and since the rest is in an ElseIf part it is not triggered
    Last edited by Phoenix5794; 09-20-2012 at 10:46 AM.
    Nothing is absolute - a paradox in itself.

    Indirect Dynamic Data Validation (scroll to the bottom of the page)

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Cell Multiple Named Ranges

    You're not giving us much to work with. No code, no workbook ...

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Cell Multiple Named Ranges

    are you testing with Intersect in the double-click event? if you are you should not be having a problem
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Forum Contributor
    Join Date
    01-09-2012
    Location
    Rochester Hills, United States
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Cell Multiple Named Ranges

    Quote Originally Posted by TMShucks View Post
    You're not giving us much to work with. No code, no workbook ...
    Like I said, I might have to omit quite a bit of information because this is a company document and if someone has a similar problem then they might know what the issue is without me having to upload anything.

    In any case, here's my double-click code (I am using Intersect):

    Please Login or Register  to view this content.
    Again, this seems to work with all of my other cells with the named range CheckBox, but not with this one cell.
    Here's the workbook: DoubleClickRange.xlsm.

    Any cell that is filled with light-blue is double-click-able (per me highlighting them), but focus on the yellow cells.

    The color column will allow me to double-click and an "X" will appear as that color column is defined by the named range CheckBox, but also the Hot Air / Cold Stake cell is defined by the CheckBox range and it won't show an "X" on the double-click (it's not merged or anything).

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Cell Multiple Named Ranges

    that cell is part of the ListIndex0 range so is handled by the first part of your code (which is not what you posted) and since the rest is in an ElseIf part it is not triggered

  6. #6
    Forum Contributor
    Join Date
    01-09-2012
    Location
    Rochester Hills, United States
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Cell Multiple Named Ranges

    Ah, geez. I'm an idiot.
    I didn't think it would even be a part of that ListIndex0 range because it shouldn't be in there.

    Thanks for noticing such a simple mistake.

    By the way, I was able to navigate to the ListIndex0 range and sift through all of those cells to find my cell (D83), but did you have a simpler way of finding it (especially since you have no idea what all of my ranges are used for)?

    I'm thinking of selecting a cell and a list of where it is defined comes up.

    Also, would there be a more efficient way to code the If/Else code in the way of a Case? I'm not sure how to word it.
    Last edited by Phoenix5794; 09-20-2012 at 10:51 AM.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Cell Multiple Named Ranges

    you could use code to list the named ranges for a cell-I just stepped through the code which gave it away ;-)

    if...elseif is actually more efficient than select case and probably easier here anyway

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Cell Multiple Named Ranges

    Create a new empty worksheet. Go to the Formulas ribbon and select "Use in Formula", "Paste Names" and "Paste List" you'll get a list of all the named ranges and what they refer to.


    Regards

  9. #9
    Forum Contributor
    Join Date
    01-09-2012
    Location
    Rochester Hills, United States
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Cell Multiple Named Ranges

    Heh, thanks to both of you guys.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Cell Multiple Named Ranges

    You're welcome. Thanks for the rep.

+ 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