LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default How to copy the new Excel 2007 conditional formats

I have a cell that has been formatted using XL2007's fancy new conditional
formats (you know data bars, color scales, icon sets, etc) and I want to
copy those conditional formats to another cell in my code. I know this can
be done using Copy and PasteSpecial but this is to blunt an instrument
(i.e., Copy and PasteSpecial will transfer more properties from the source
to the target than I want). All I want is to copy the conditional formats.

It looks like the conditional format lives in the FormatConditions
collection of the range object but I'm not sure how to copy them.

For example, Target.FormatConditions = Source.FormatConditions doesn't work.

I can loop through them:

For Each condition in Source.FormatConditions
' what do I do here? Maybe ...
Target.FormatConditions.Add condition.????
' or maybe?
Target.FormatConditions.AddIconSetCondition condition.???
Next condition

Yikes.

TIA,

josh



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Conditional formatting with number formats Brian Charlton Excel Discussion (Misc queries) 3 July 30th 09 08:13 PM
Copy Conditional Formats on a List jlclyde Excel Discussion (Misc queries) 2 January 6th 09 01:02 PM
Excel, how to copy conditional formats in sequential order 1,2,3 ShoDan Excel Worksheet Functions 6 July 3rd 07 01:54 PM
copying conditional formats (2007 Beta) Bud Excel Worksheet Functions 1 October 5th 06 11:14 PM
Copy Conditional Formats MM[_4_] Excel Programming 2 August 3rd 04 02:34 PM


All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"