Reputation: 31
I have set the conditional formatting for one row, in the way I want it for approx 50 other rows.
Applying the conditional formatting to each rows take too much time. Is there a script that could do this automatically?
The conditional formatting for each row (first row is 21) is that: if the date (AB20) is the same as H21, then color AB21 yellow; if the date (AB20) is the same as F21, then color AB21 green.
Thanks!
Upvotes: 3
Views: 4190
Reputation:
Don't copy conditional formatting: apply it to a range instead (range is entered when a conditional formatting rule is created or when it's edited). Write the custom formula as it should work for the upper left corner of the range. It will be automatically adjusted for other cells based on relative references, even though this may not be obvious.
In your case, the range should be AB21:AB and the custom formulas are either
= AB20 = H21
and = AB20 = F21
if the goal is to compare F and H of the current row with AB of the previous row. = AB$20 = H21
and = AB$20 = F21
if the goal is to compare F and H of the current row with AB of row 20. Upvotes: 1