Results 1 to 2 of 2

Automatically updating cells on different sheets when one cell is updated and vice versa.

Threaded View

DanDan155 Automatically updating cells... 02-14-2016, 06:38 AM
xladept Re: Automatically updating... 02-14-2016, 03:41 PM
  1. #1
    Registered User
    Join Date
    11-06-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    1

    Automatically updating cells on different sheets when one cell is updated and vice versa.

    Hi Everyone,

    I hope someone can help- I have two sheets- a tracker and a gantt chart. When a date is changed in the tracker I need it to change in the gantt chart and vice versa. I have the following code that works fine for one project which has dates in column Q of the tracker and update E6-E106 in the gantt chart. I can't work out how to expand the code for more columns in the tracker, say column Y26:Y126 which I want to update E111:E211. Can anyone help?
    Private Sub Worksheet_Change(ByVal Target As Range)
        
        Dim r1 As Range, r2 As Range
        Set r1 = Sheets("GANTT CHART").Range("E6:E211")
        Set r2 = Sheets("Project Tracker").Range("Q26:Q126", "Y26:Y126")
        
        If Intersect(Target, r1) Is Nothing Then
       
        Application.EnableEvents = False
            r2.Value = r1.Value
     Application.EnableEvents = True
    End Sub


    Private Sub Worksheet_Change(ByVal Target As Range)
       
        Dim r1 As Range, r2 As Range
        Set r1 = Sheets("Project Tracker").Range("Q26:Q126", "Y26:Y126")
        Set r2 = Sheets("GANTT CHART").Range("E6:E211")
       
        If Intersect(Target, r1) Is Nothing Then Exit Sub
        Application.EnableEvents = False
            r2.Value = r1.Value
    Application.EnableEvents = True
    End Sub
    Moderator notes:
    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Last edited by alansidman; 02-14-2016 at 09:36 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Automatically lookup and set an empty cell's value if adjacent cell is typed & vice versa
    By RedSummer in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-22-2015, 12:16 PM
  2. Hyperlink Cells to Pivot Tables or Vice Versa
    By JakeMann in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-24-2014, 09:49 AM
  3. Replies: 1
    Last Post: 02-01-2013, 03:38 PM
  4. A clever way to pass lot of ranges from the sheets to VBA and vice versa
    By TopXorGuy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2013, 02:49 PM
  5. Page name from cell or vice versa
    By Audiguy82 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2008, 06:21 PM
  6. Replies: 3
    Last Post: 05-02-2005, 04:06 PM
  7. [SOLVED] Can I rotate excel sheets so columns are rows & vice-versa (i.e..
    By JamesR in forum Excel General
    Replies: 3
    Last Post: 01-12-2005, 10:06 PM

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