title: Dynamic link of source and target sheets
body: <p>I have a very large sheet of data with comments applied to different projects (totally 16). Each comment has a status such as active, confirmed, cancelled or blank (if not applicable) applied to the projects</p>
  
  <p>It's difficult for users to update the status with filters in the source sheet because when many users using the sheet they cannot apply different filters at the same time.   </p>
  
  <p>The best way is to pull all data from the source sheet to many target sheets (one for each project) and apply filters according to project, so the users can update the status in target sheets. My problem is how to get the new updated status from the target sheets into the source sheet.  </p>
  
  <p>I have found a script to automatically update all target sheets whenever I change or add something in the source sheet, but I need also to update the source sheet when I change the status in the target sheet (project sheets). See script below:</p>
  
  <pre><code>function getdata() {
    var files = DriveApp.getFolderById(""folder key with target sheets"").getFiles()
      while (files.hasNext()) {
        var file = files.next();
        var shoot = SpreadsheetApp.openById(file.getId());
  
        var sourcesheet = SpreadsheetApp.getActive().getSheetByName(""source sheet name"");
        var sourcerange = sourcesheet.getRange('A:AE');
        var sourcevalues = sourcerange.getValues();
  
      var destsheet = shoot.getSheetByName('target sheets name same for all'); 
        var destrange = destsheet.getRange('A:AE'); 
      destrange.setValues(sourcevalues);         
  </code></pre>
  
  <p>See below a link of my source sheet:</p>
  
  <p><a href="https://docs.google.com/spreadsheets/d/1h0mpPo2nl9AoCF-hJDjMaU3sZg-qBX4dat7Ig4poAJo/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1h0mpPo2nl9AoCF-hJDjMaU3sZg-qBX4dat7Ig4poAJo/edit?usp=sharing</a></p>
  
  <p>The sheet "form responses new" receiving comments from users through a form and I manually cut and paste them in sheet ""Sent"" after review and submission.  </p>