+ Reply to Thread
Results 1 to 2 of 2

Synchronising cells using VBA

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    25

    Synchronising cells using VBA

    Hi All,

    I'm looking to use a code to synchronise several cells on two different sheets within a spreadsheet. I have used a code in the past where one cell linked to another by VLOOKUP, and vice versa using VBA so as to not create a circular reference.

    In this instance however I want to be able to type text into each cell that link to each other using VBA. To further complicate matters, the data in the "Site Data" tab will need to change depending on the site dropdown list, as it would with a VLOOKUP function. And to add to all of this, there will be sites added continuously to the "Costs Tracker" tab (i.e. a new row added to the bottom of the table), and I would like for this data to automatically link to the "Site Data" tab when selected from the dropdown list.

    I have attached a copy of the spreadsheet. The two tabs in question are "Cost Tracker", and "Data Sheet". In the data sheet tab I have written the relative cell name from the "Cost Tracker" tab that I would like the cell to synchronise with (obviously C4 for example would change to C5 / C6 if the site is changed from the dropdown list). Sorry if I haven't explained myself very well, I'm new to using VBA, so not sure if this is simple or more complex to achieve. I'm not necessarily looking for someone to write the the entire code, but if someone could point me in the right direction it would be much appreciated.

    I'm sure there will be some important info that I have failed to mention, so if I need to clarify anything, let me know.

    Thanks in advance.

    Aidan
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Synchronising cells using VBA

    Look at attached worbook for a working solution. I created a named range for the Sites_Drop_Down_List based on the column B in sheet "Costs Tracker". I assumed there will be no duplicate of sites name.
    I also assumed sheet "Costs Tracker" as being kind of your main database (Where data are stored). Sheet "Site Data" is more like an easy to update the values or visualize the data. So it works like this:
    1. If you change the drop down list in "Site Data", a macro will change the values of every cells to reflect the values stored in "Costs Tracker" for this site.

    2. If you edit some values while in "Site Data" and you want to update those values into "Costs Tracker", you just have to click on the button at the top left corner of the sheet.

    Hope it works like you wanted. If not, let us know.
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

+ 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. [SOLVED] Synchronising data being referenced dependent on a non zero value
    By RupertC in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-26-2012, 03:35 AM
  2. [SOLVED] Synchronising outlook calendar with various Excel Dates
    By Essay in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2012, 12:24 PM
  3. Synchronising Excel Documents Across SharePoint
    By goobler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2010, 06:09 PM
  4. synchronising combo boxes
    By Vetequk in forum Excel General
    Replies: 2
    Last Post: 02-02-2009, 03:41 PM
  5. synchronising pivot tables
    By Johngio in forum Excel General
    Replies: 1
    Last Post: 07-31-2006, 09:08 AM

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