I've been lookin for a function to change the color of all cells in a row, when some text in a certain cell equals something. I found it here:
Google Spreadsheet: Script to Change Row Color when a cell changes text;
My question is, how can i execute this function, when the text changes?
The onEdit(e) trigger runs automatically when a user changes the value of any cell in a spreadsheet.
Search for the function onEdit. https://developers.google.com/apps-script/guide_events
Given when some text in a certain cell equals something Conditional Formatting may be much simpler. onEdit
would be required if the change is from 'any value' to 'any other value' (so potentially from y
to x
as well from x
to y
) but CF can be triggered in cases such as:
"from less than 100
to 100
(or to 100 or more than 100
), etc.",
"from Pending
to Complete
(or to any member of a list such as Abandoned
, Transferred
, Rescheduled
, etc.)",
"from more than a year left
to less than a month
(or a week
, or 4 days
, etc.)",
"from any one of Red, Orange, Yellow
to Green or Blue
(or either Indigo or Violet
, etc.),
"from being a unique entry in a list to being a duplicate (ie without changing its own value becomes equal to any other entry)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With