I want to be able to write something like:
wks.Range("A1").FormatConditions = r.FormatConditions
to copy conditional formatting from one cell to another. Is this possible to do? I want to copy conditional formatting from one cell to another by using one line of code, just like when I copy a formulas from one cell to another:
wks.Range("A1").Formula = r.Formula
Maybe there is a built-in command for this in VBA that I have not found? Maybe someone has written a custom sub for this?
r in the above examples is a range.
I don't think you can do it using one line of code. However, you can do it using two lines:
This will copy all the formatting including the format conditions.