Here's my spreadsheet
Here's what I'm trying to do.
When a user enters any data from row 4 and below, onEdit() function checks the top row to see if Session.getActiveUser(); matches "[email protected]".
*Col 1,2 and 3 at cell range A:C can only be edited by email of A1.
*Col 1,2, and 3 at cell range D:F can only be edited by email of D1.
This is only what I've done so far to check user's edited cell..
function onEdit(e) {
var editedSheet = e.source.getActiveSheet();
var editedRange = e.source.getActiveRange();
// clear edited value if email does not match
if (Session.getActiveUser() != range.getCell(1,1).getValue()) {
editedRange.setNote(""); // clear value
}
}
The problem is that it will be very tedious to check each cell in A1, D1 and so on, since I have several sheets in the spreadsheet.
The other sheets might not necessarily start on column 'A' either. The cell structure might start on column 'B'.