Posts

Showing posts from January, 2015

Google Spreadsheet: Script to Change Row Background Color on Cell Edit

Now for something a little different! Google Spreadsheets! Here is a little script I cooked up today for changing a row color in Google Spreadsheet when you change the contents of a drop down menu. When you change the contents of a cell in the designated "status" column the entire row will change it's background color to match whatever rule you have defined in the switch statement. A useful addition to this would be the ability to automatically find the status column in whatever sheet you have open, but it was beyond the scope of what the script was meant for, so here is it in the raw! /** Google Sheets Script to modify a row's color based on the 'Status' entry. This script uses the onEdit() method, which is called every time a cell is edited. The statusColumn variable's cells are assumed to be a drop-down with the following options: Complete In Progress Not Started Revisions Req Blocked The script modifies a row's color based on the contents- leaving