Answer the question
In order to leave comments, you need to log in
How to make a cell color change automatically depending on the user entering data into this cell?
There is a table which is allowed to be edited only by three users. It is necessary to make the cells edited by user 1 change color to blue, and user 2 to red, etc.
Answer the question
In order to leave comments, you need to log in
Use these things:
onEdit(event) to determine if the table has changed
Session.getActiveUser().getEmail() - to determine the current user's email
event.source.getActiveRange() - to determine the current cell
setBackground() - to set the desired color
function onEdit(event){
if (Session.getActiveUser().getEmail()=="[email protected]") event.source.getActiveRange().setBackground("#FF0000");
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question