+ Reply to Thread
Results 1 to 12 of 12

Link three or more cells across spreasheets

  1. #1
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    Link three or more cells across spreasheets

    Hello everyone!

    I'd like to apologise if this issue has already been discussed previously, but despite searching high and low on Google and on this forum, I couldn't find any answer for my problem.

    What I am trying to do is as follow:

    I'd like to get a cell that displays the same value across all sheets, so that if I put a value in - for example - D3 in Sheet1, it'll display the same value in D3 in Sheet2 et Sheet3, but if I edit D3 in Sheet2, it'll also change the value of D3 in Sheet1 and Sheet3, and so on.

    (Basically, some people and I have to manage an inventory where products are separated in different sheets, and I'd like them to be able to put the last time they changed something in the inventory, i.e "Last edited on 5/17/14". And I'd like this date to be displayed on all the sheets, without having to edit the "last time edited" date on all the sheets, nor having to go back to Sheet1 to see the date).

    I'm quite the newbie at Excel, I tried some things, but I really don't know what tool I should use to do this.


    Thanks a ton in advance for helping me out!

    A-Z

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Link three or more cells across spreasheets

    Assume you have three sheets. The cell holding the date you will be updating is in A1 in each.

    In sheet1, enter the date.
    In sheet2, in cell A1, enter ='Sheet1'!A1
    In sheet3, in cell A1, enter ='Sheet1'!A1
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Link three or more cells across spreasheets

    Thanks for the very quick answer!

    However, I tried that solution before. If I edit A1 on Sheet1, the value is correctly repeated on Sheet2 and Sheet3, but if I edit A1 on Sheet2 or Sheet3, it doesn't affect the other sheets, so it doesn't really fix my issue.

    What I'd need is for A1 to be a constant cell across all sheets, no matter what sheet I edit A1 from.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Link three or more cells across spreasheets

    Here is a VBA solution. There is not a formulary solution for this.

    Please Login or Register  to view this content.
    Open your workbook. Click on Alt F11
    In the left window, double click on ThisWorkbook.
    The right window will appear
    Paste the code below any currently visible code.
    Close the VBE

    Save your file with as an .xlsm file if you are using XL 2007 or later.

    This code will update the A1 locations in each sheet upon closing.

  5. #5
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Link three or more cells across spreasheets

    Thanks again for helping me!

    I followed your steps carefully, but that doesn't seem to work. Is the fact that I renamed the sheets' names bothersome for the code (Though I did try to replace all the "Sheet1", "Sheet2" and so on with their respective custom name)? Do I really have to simply close Excel and then open the file again for the changes to take effect? I did everything you wrote.

    Thank you once again.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Link three or more cells across spreasheets

    If you close the file and reopen, then the change should take place as it occurs just before closing.

  7. #7
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Link three or more cells across spreasheets

    How do I have to use that code? I must be doing something wrong: I enter a date in A1 on Sheet1 (The A1 cells being empty on Sheet2 and Sheet3), I save and close the file, but when I re-open it, the A1 cells on Sheet2 and Sheet3 are still empty.

    Is there any step I missed?

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Link three or more cells across spreasheets

    My bad, I gave you the wrong code. I gave you the code I tested as a macro and not as a worksheet function.

    Take this code and install as I indicated above.

    Please Login or Register  to view this content.
    My apologies. This should do it for you.

  9. #9
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Link three or more cells across spreasheets

    Thanks a ton, that works great! The only issue I'm having is that all the A1 cells have to be empty first: It works perfectly fine the first time, but when I re-open the file, edit the date in one of the A1 cells and close it again, it goes back to the previous date, the one in the other 2 A1 cells. Is it supposed to do this or did I fail something when copy/pasting?

  10. #10
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Link three or more cells across spreasheets

    Wait, I'm sorry, I understood the code only now: It detects the highest value between the 3 cells and then it applies the highest in the other cells, which makes sense for a "last edited" date! It wasn't working because I was testing with random dates, but now that I understood, it works perfectly!

    I only got 2 questions:
    - Is there a way to make the change more instantaneous? So that people don't have to wait until they have to close the file for the changes to be made?
    - And would it be possible to adapt the code to create another cell "Last edited by <name of the person>", based on the same principle as "Last edited on <date>" (Changing one cell - let's say B1 this time - in one sheet changes B1 in the other sheets)?

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Link three or more cells across spreasheets

    To add the name of the last person to edit:

    Please Login or Register  to view this content.
    Working on seeing if I can develop a Change event that updates after the change. Will post if I am able to do so.

  12. #12
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Link three or more cells across spreasheets

    Wow, that works super fine, you're amazing! I don't think I could thank you enough!

+ 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. Compare two spreasheets
    By zotiraki in forum Excel General
    Replies: 1
    Last Post: 07-03-2009, 06:34 AM
  2. Reports from Commonalities In Spreasheets
    By rmccaul3 in forum Excel General
    Replies: 0
    Last Post: 08-11-2006, 12:50 PM
  3. Replies: 7
    Last Post: 09-23-2005, 02: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