
For example, it allows users to implement graphic design elements to achieve the document layouts they desire. Google Docs provides a free alternative to other programs, and it includes many common functions. update the row color based on the entered valueĬtBackground("#00ff00") //sets row color to greenĬell.Many people use word-processing programs to complete daily tasks related to drafting documents. check that the edited cell is in the trigger column get the edited value for the cell as a string Var colorRow = sheet.getRange(thisRow,thisCol,1,Cols)


set a range variable for the entire row get the cell you edited and the associated column and row number

function to update row color using entered text in a specified "trigger" column *you will need to add an onEdit trigger to your project You can use this to do anything that can be done on the sheet via scripting such as change values, set font weight, copy data, or even run other functions after checking the trigger text input. I've provided an example below for how to change row color based on trigger text in a designated "trigger" column.

If you need something to process more quickly you may have to look for an alternate approach. The biggest downside to this approach is that it takes (at least for me) approximately 7 full seconds for the onEdit trigger to catch the change and perform the update. You can then set an onEdit event trigger in the project's triggers under "Resources" in the script editor for your hotkey function. One possible work around for this would be to dedicate a column for "trigger text", define different text based triggers for each action you're trying to perform, and then create a function that checks the value and performs an action based on the "trigger text".
