You are viewing a single comment's thread from:

RE: The Cryptocurrency Bank Spreadsheet

in #crypto8 years ago

Made another tweak to my personal copy:

With this new function:

function takeSnapshot()
{
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 var sheet = ss.getSheets()[0];
 var range = sheet.getRange("K2:L2");
 var rowCount = SpreadsheetApp.getActiveSheet().getRange('SnapshotRow').getValue();  
 rowCount = rowCount+1;
 SpreadsheetApp.getActiveSheet().getRange('SnapshotRow').setValue(rowCount);  
 range.copyValuesToRange(range.getGridId(), 11, 12, rowCount+2, rowCount+2);
}

with SnapshotRow being M10. Every time the snapshot button is pressed, it copies the current values from K2:L2 and puts them in the portfolio value section.

I'd love to add these to the main sheet, but if that triggers the script access stuff, then that's a non-starter, IMO.