Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to update my Change Log script to show how it affected other cells in the spreadsheet [closed]

$
0
0

I was able to use the following script to create a change log so I can now see where and when a change occurred across multiple tabs on my spreadsheet:

function onEdit(e) {   var sName = e.source.getActiveSheet().getSheetName();    if(sName !== "Change log") {    var value = e.value    var oldValue = e.oldValue    var mA1 = e.range.getA1Notation().split(":")[0];    var time = new Date();        if(typeof(e.value) == 'string') {      var aCell = e.source.getRange(mA1);      value = aCell.getValue();      var form = "'" + aCell.getFormula();    } else {      value = e.value;          }    var data = [sName, mA1, time, value, oldValue, form];    e.source.getSheetByName("Change log").appendRow(data);  }}

Is there any way that I can see how those changes affected specific cells? For example if the change log documents an update in salaries for February, how did that change affect the fiscal year balance cell (which was updated because of a formula in the cell but wasn't directly changed).


Viewing all articles
Browse latest Browse all 9782

Trending Articles