I've got a master sheet that I need to view and filter data from. The data is brought into the sheet using the =Sheet2!B7 syntax.
The problem is that I keep accidentally editing the data in the master sheet which does not update the original copy.
I would like a script that alerts me if I'm in the master sheet and stops me from editing the cells. I still want to be able to filter the data so simply locking the sheet would work.
I've been trying to modify this script (posted by Yuzhy) but so far I haven't been able to get it to work.
(I'm not sure whether this is the right place for this question, it was either this or stackexchange / superuser, if it's wrong please advise.)
function onEdit(event){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = SpreadsheetApp.getActiveSheet(); var CellRow = SpreadsheetApp.getActiveRange().getRow(); var CellColumn = SpreadsheetApp.getActiveRange().getColumn(); if (CellColumn == 2){ sheet.getRange(CellRow, CellColumn).setFormula("=A"+CellRow+"+1"); Browser.msgBox("DON'T MESS WITH THE FORMULAS!"); } } Any help much appreciated.