vba - Excel - Copy Conditional Formatting, Remove Rules, Keep Format -
i know show you've tried in question, more of "do have routine this?" question , i'm hoping you'll willing let slide...
i'm working on macro copies cells conditionally formatted in source worksheet , pastes them output sheet. basically, i'm looking keep formatting, shading, etc, remove conditions (make current formatting static) in output sheet.
i've seen solutions online - ranging copying first word document , pasting back, looping through output cells , copying format-element format-element - , looking good, efficient way this.
does have 1 / link they'd willing share??
(excel 2010)
thanks!!!!
yes possible :) need change formatting of cells plan copy mimicking displayformat
, deleting conditional formatting
sub keep_format() dim ws worksheet dim mysel range, acell range '~~> change relevant sheet set ws = thisworkbook.sheets("sheet1") '~~> change relevant range set mysel = ws.range("a1:a10") each acell in mysel acell .font.fontstyle = .displayformat.font.fontstyle .interior.color = .displayformat.interior.color .font.strikethrough = .displayformat.font.strikethrough end next acell mysel.formatconditions.delete ' '~~> copying ' '~~> once done, close sorce worksheet without saving end sub
Comments
Post a Comment