+ Reply to Thread
Results 1 to 89 of 89

Excel Relationship linking Macro

Hybrid View

  1. #1
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Excel Relationship linking Macro

    Nandu;

    Ok, we may be able to work this out after all.

    Do you want to use my previous macros to build the lists on sheets("How cells are linked")?

    This is how I would approach this problem.

    If the cells that are listed in Column B are not ALWAYS on 1 sheet then I would create an invisible sheet to store the lists along with what sheet they are on.

    1. Click a cell in sheets("How cells are linked").Columns("C").
    2. Set the color of that cell (leave blank to use default color that is at the top of the column).
    3. Double Click that cell to tell Excel that you are creating a list.
    4. Double Click the cell (on any sheet) you want to have in Column A.
    5. Double Click on the cells (on any sheet) you want to have listed in Column B.
    6. Double Click on the cell in Columns C (from steps 1-3) to tell Excel you are done creating the list.

    7. Double Click a cell in Column A, and Excel will move you to that cell and highlight the rest of the cells in that list.
    8. Single or Double Click (you tell me which you prefer) on any uncolored cell to reset highlighting back to blank.

    optional:
    I would also create a name for the list to store in Column D, and also store the contents of all the cells (from steps 4-5) in Columns F:Z.
    Put a menu button to hide/display sheets("How cells are linked").
    Double click on a highlighted cell (from steps 4-5) to take you back to sheets("How cells are linked")

    Do you really need Column A? I can easily make it that when you double click on a list, Excel will move you to the 1st cell in the list and highlight the rest of the list.

    Let me know if that sounds like it will work. Shouldn't take long, now that I know what I'm doing.
    I won't be around tomorrow, but I'll be back the next day.
    Last edited by foxguy; 05-26-2010 at 10:17 PM.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  2. #2
    Registered User
    Join Date
    09-17-2009
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    48

    Thumbs up Re: Excel Relationship linking Macro

    Hi Guru Foxguy,
    Thank you very much. I am glad i am working with you, you have clearly understood me.

    With those clicks which generates this list, hope it will take into account, viewers will click on the cells inadverdently and whole information becomes unreliable.

    Also when this "how cells are linked" are created dynamically, will the data integrity stands when i reopen the spreadsheet.

    Note: Though the cells are random and each cell creates a relation to be viewed, once relationship is established, changes are very less often. I may keep adding data, which i am happy to add in cells and relation manually( that list may grow enormously).
    If i were to circulate dynamic cell linkage list you propose, i have a doubt, if it stands valid with viewers clicking it to move down and using mouse by mistake.
    I really appreciate in thinking much ahead in creating much advanced controls but then i would request two sheets, one to tamper with clicks to see data and other i can enable the cell linkage creation as well. I think that would be unfair for me to ask, unless you guide me to piece of macro to be deleted or commented to play around after creation of data linkages.

    Regarding reset, i think double click on plain cell( cell having no relation) would be great to clear out all colors.

    Thanks a ton really.
    Cheers
    Nandu

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Excel Relationship linking Macro

    Nandu;

    Before I leave for the day, I wanted to get answers from you, so they will be ready when I get back.

    With those clicks which generates this list, hope it will take into account, viewers will click on the cells inadverdently and whole information becomes unreliable.
    We can protect sheet("How cells are linked") with a password, so that no one else can use it. Anyone who wants to change the relationships, will have to have the password, so no one can accidentally change them.

    Also when this "how cells are linked" are created dynamically, will the data integrity stands when i reopen the spreadsheet.
    Yes, when they are created dynamically, they will be stored permanently in sheet("How cells are linked"), and then will still be there when you reopen the file (as long as you save changes).

    The questions you ask seem to indicate that sheet("How cells are linked") does not currently exist in your workbook. That's good, I can design it myself to do everything I think you need.

    If sheet("How cells are linked") does already exist in your workbook, then please upload an exact copy of your workbook. Make a copy and then delete all information that you don't want anyone to see and then upload it, so I can see the exact layout of sheet("How cells are linked").

    If it doesn't exist, then this is how I propose we set it up so no one but you can accidentally destroy relationships. I think the only thing you might have to worry about is if someone moves data around on the sheet, but I think we can even protect against that.

    Hide sheet("How cells are linked"). When the sheet is hidden, no one (not even you) can destroy or modify a relationship.
    Make a temporary menu button (that appears when the workbook is activated, and goes away when the workbook is deactivated) that will hide/show the sheet with a password, so you can make changes to the relationships.
    When it's hidden no one (not even you) can change the relationships.

    Note: Though the cells are random and each cell creates a relation to be viewed, once relationship is established, changes are very less often. I may keep adding data, which i am happy to add in cells and relation manually( that list may grow enormously).
    No need to do it manually. I'll set it up so that when you select a relationship, all cells in it will change color, and you will double click cells you want to add or remove from the list.

    If i were to circulate dynamic cell linkage list you propose, i have a doubt, if it stands valid with viewers clicking it to move down and using mouse by mistake.
    I know this is because you don't speak English really well.
    I don't understand what "if it stands valid with viewers" means, but I think you're saying that you doubt viewers will move things on the worksheets, but I think we can protect against that also.

    I really appreciate in thinking much ahead in creating much advanced controls but then i would request two sheets, one to tamper with clicks to see data and other i can enable the cell linkage creation as well.
    I think you're asking for a practice sheet. You will be able to create your own sheets and tamper with them as much as you want. I'll set it up on the sheet("How cells are linked") that you can delete a list when you want, so you can tamper as much as you want, then just delete the list when you are done.
    Nothing I set up will do anything to your data anywhere in the workbook. The only things it will change are the lists on sheet("How cells are linked"). The only thing it will change on your data sheets will be the cell colors, and you can always manually remove all cell colors at once (without changing any data) if you need to.

+ 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