I am using Google Spreadsheets and I am trying to do the following:
How can I get a range of cells (R2:V2) to match the background color of D2 when I change the color of cell D2.
For example: If I change the background color of D2 to red. I want cells R2 through V2 to format to the same color red.
If I change the background color of D3 to green. I want cells R3 through V3 to format to the same color green.
You can do this with onChange:
This well also work when D2 is changed by conditional formatting or the background color from another function (the function needs to call onChange()).