I am trying to get a cell to blink (alternate colours white-red) when it contains the word "Red". I currently have the following code that I have found, but don't know how to modify it to particularly look for the word every time an edit is made.
function onEdit(e)
{
var ss = SpreadsheetApp.getActiveSpreadsheet();
var mysheet = ss.getSheetByName("LBACC17");
var activeCell = ss.getActiveCell().getA1Notation();
if( activeCell == "K2" )
{
for(var i=0;i<50;i++)
{
if( i%2 == 0 )
mysheet.getRange("K3").setBackground("RED");
else
mysheet.getRange("K3").setBackground("WHITE");
SpreadsheetApp.flush();
Utilities.sleep(500);
}
}
}