Skip to main content
added revised script based on new findings
Source Link
Jacob Jan
  • 23.3k
  • 16
  • 106
  • 195

With the following Google Apps Script you can grab the LIBOR value and added it to a new sheet. Goto the script editor:
enter image description here

and add this script:

UPDATE 25-01-2013
I've noticed that the trigger occasionally troughs a NA#. Most probably because the GoogleFinance formula takes some time to get its info. Therefore I revised the snippet a bit, to have a sleep function added to it:

NEW

function myCustomCalculation() {
  //set active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet(); 

  // get both the sheets 
  var sh0 = ss.getSheets()[0], sh1 = ss.getSheets()[1];
  
  // sleep
  Utilities.sleep(6000);
  
  // get cell value
  var cell = sh0.getRange("D2").getValues()[0];
  
  // add libor value to other sheet  
  sh1.appendRow([new Date(), cell]);
}

OLD

function myCustomCalculation() {
  //set active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  
  // flush the spreadsheet before using it  
  SpreadsheetApp.flush();

  // get both the sheets 
  var sh0 = ss.getSheets()[0], sh1 = ss.getSheets()[1];
  
  // get cell value from sheet[0]
  var cell = sh0.getRange("D2").getValues()[0];
  
  // add libor value to other sheet  
  sh1.appendRow([new Date(), cell]);
}  

The clue to the story is to create a time based trigger:
enter image description here

and set the trigger to execute at 5-6 pm:
enter image description here

See the example file I´ve created: LIBOR. I've added an extra menu item, so that you can execute the script this way.

With the following Google Apps Script you can grab the LIBOR value and added it to a new sheet. Goto the script editor:
enter image description here

and add this script:

function myCustomCalculation() {
  //set active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  
  // flush the spreadsheet before using it  
  SpreadsheetApp.flush();

  // get both the sheets 
  var sh0 = ss.getSheets()[0], sh1 = ss.getSheets()[1];
  
  // get cell value from sheet[0]
  var cell = sh0.getRange("D2").getValues()[0];
  
  // add libor value to other sheet  
  sh1.appendRow([new Date(), cell]);
}

The clue to the story is to create a time based trigger:
enter image description here

and set the trigger to execute at 5-6 pm:
enter image description here

See the example file I´ve created: LIBOR. I've added an extra menu item, so that you can execute the script this way.

With the following Google Apps Script you can grab the LIBOR value and added it to a new sheet. Goto the script editor:
enter image description here

and add this script:

UPDATE 25-01-2013
I've noticed that the trigger occasionally troughs a NA#. Most probably because the GoogleFinance formula takes some time to get its info. Therefore I revised the snippet a bit, to have a sleep function added to it:

NEW

function myCustomCalculation() {
  //set active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet(); 

  // get both the sheets 
  var sh0 = ss.getSheets()[0], sh1 = ss.getSheets()[1];
  
  // sleep
  Utilities.sleep(6000);
  
  // get cell value
  var cell = sh0.getRange("D2").getValues()[0];
  
  // add libor value to other sheet  
  sh1.appendRow([new Date(), cell]);
}

OLD

function myCustomCalculation() {
  //set active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  
  // flush the spreadsheet before using it  
  SpreadsheetApp.flush();

  // get both the sheets 
  var sh0 = ss.getSheets()[0], sh1 = ss.getSheets()[1];
  
  // get cell value from sheet[0]
  var cell = sh0.getRange("D2").getValues()[0];
  
  // add libor value to other sheet  
  sh1.appendRow([new Date(), cell]);
}  

The clue to the story is to create a time based trigger:
enter image description here

and set the trigger to execute at 5-6 pm:
enter image description here

See the example file I´ve created: LIBOR. I've added an extra menu item, so that you can execute the script this way.

Source Link
Jacob Jan
  • 23.3k
  • 16
  • 106
  • 195

With the following Google Apps Script you can grab the LIBOR value and added it to a new sheet. Goto the script editor:
enter image description here

and add this script:

function myCustomCalculation() {
  //set active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  
  // flush the spreadsheet before using it  
  SpreadsheetApp.flush();

  // get both the sheets 
  var sh0 = ss.getSheets()[0], sh1 = ss.getSheets()[1];
  
  // get cell value from sheet[0]
  var cell = sh0.getRange("D2").getValues()[0];
  
  // add libor value to other sheet  
  sh1.appendRow([new Date(), cell]);
}

The clue to the story is to create a time based trigger:
enter image description here

and set the trigger to execute at 5-6 pm:
enter image description here

See the example file I´ve created: LIBOR. I've added an extra menu item, so that you can execute the script this way.