Reputation: 21784
Can I copy conditional formatting from one cell to another using VBA?
I'm imagining something like:
Sheets("A").Range("A1:A10").ConditionalFormatting = Sheets("B").Range("B1").ConditionalFormatting
Upvotes: 4
Views: 26097
Reputation: 5782
use this:
Sub test()
Sheets("B").[B1].Copy: Sheets("A").[A1:A10].PasteSpecial xlPasteFormats
End Sub
Upvotes: 3