G2A Many GEOs
SHARE
TWEET

Google Sheet Script

dragonbane Aug 5th, 2019 19 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. volunteerSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Volunteer Signups');
  2.   scheduledRacesSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Scheduled Races');
  3.  
  4.   //A from scheduled Races B
  5.   var volunteerStartingIndex = 10;
  6.   var scheduledStartingIndex = 2;
  7.  
  8.   for (var i = 0; i < 500; i++) {
  9.     var targetRange = volunteerSheet.getRange(volunteerStartingIndex, 1);    
  10.     targetRange.setFormula("=INDIRECT(\"'Scheduled Races'!$B" + scheduledStartingIndex + "\")");
  11.    
  12.     volunteerStartingIndex++;
  13.     scheduledStartingIndex++;
  14.   }
  15.  
  16.   volunteerStartingIndex = 10;
  17.   scheduledStartingIndex = 0;
  18.  
  19.   //B
  20.   for (var i = 0; i < 500; i++) {
  21.    
  22.     var targetRange = volunteerSheet.getRange(volunteerStartingIndex, 2);    
  23.     targetRange.setFormula("=IF(A" + volunteerStartingIndex + "=\"\",\"\",TEXT(A" + volunteerStartingIndex + ",\"ddd\"))");
  24.    
  25.     volunteerStartingIndex++;
  26.   }
  27.  
  28.   volunteerStartingIndex = 10;
  29.   scheduledStartingIndex = 2;
  30.  
  31.   //C from scheduled Races B
  32.   for (var i = 0; i < 500; i++) {
  33.     var targetRange = volunteerSheet.getRange(volunteerStartingIndex, 3);    
  34.     targetRange.setFormula("=INDIRECT(\"'Scheduled Races'!$B" + scheduledStartingIndex + "\")");
  35.    
  36.     volunteerStartingIndex++;
  37.     scheduledStartingIndex++;
  38.   }
  39.  
  40.   volunteerStartingIndex = 10;
  41.   scheduledStartingIndex = 2;
  42.  
  43.   //D
  44.   for (var i = 0; i < 500; i++) {
  45.    
  46.     var targetRange = volunteerSheet.getRange(volunteerStartingIndex, 4);    
  47.     targetRange.setFormula("=IF(C" + volunteerStartingIndex + "=\"\",\"\",C" + volunteerStartingIndex + "+'Timezone Calc'!$A$2)");
  48.    
  49.     volunteerStartingIndex++;
  50.   }
  51.  
  52.   volunteerStartingIndex = 10;
  53.   scheduledStartingIndex = 2;
  54.  
  55.   //E
  56.   for (var i = 0; i < 500; i++) {
  57.    
  58.     var targetRange = volunteerSheet.getRange(volunteerStartingIndex, 5);    
  59.     targetRange.setFormula("=IF(C" + volunteerStartingIndex + "=\"\",\"\",C" + volunteerStartingIndex + "+'Timezone Calc'!$A$3)");
  60.    
  61.     volunteerStartingIndex++;
  62.   }
  63.  
  64.   volunteerStartingIndex = 10;
  65.   scheduledStartingIndex = 2;
  66.  
  67.   //F from scheduled Races C
  68.   for (var i = 0; i < 500; i++) {
  69.     var targetRange = volunteerSheet.getRange(volunteerStartingIndex, 6);    
  70.     targetRange.setFormula("=INDIRECT(\"'Scheduled Races'!$C" + scheduledStartingIndex + "\")");
  71.    
  72.     volunteerStartingIndex++;
  73.     scheduledStartingIndex++;
  74.   }
  75.  
  76.   volunteerStartingIndex = 10;
  77.   scheduledStartingIndex = 2;
  78.  
  79.   //G from scheduled Races D
  80.   for (var i = 0; i < 500; i++) {
  81.     var targetRange = volunteerSheet.getRange(volunteerStartingIndex, 7);    
  82.     targetRange.setFormula("=INDIRECT(\"'Scheduled Races'!$D" + scheduledStartingIndex + "\")");
  83.    
  84.     volunteerStartingIndex++;
  85.     scheduledStartingIndex++;
  86.   }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top