Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional Formatting -

I wish to copy (programmatically) a range that has conditional
formatting associated with it, and I want the same conditional
formatting to appear in the destination range. Is there an easy way
to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default Conditional Formatting -

The solution depends on the condition of the formatting.
For example, if it's simply to format the cell if a value
is equal to, greater than, less than, etc. a certain
value, all you have to do is:

'Where A1 has your conditional format
'and A2 is your destination
Range("A1").Copy
Range("A2").PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False

If your conditional format is a formula, pay attention to
the absolutes in the formula. The dollar signs before the
columns and rows will keep those references the same when
you copy the format. So if the formula is:

=$B$1+$B$2=2

meaning to format the cell if the values in B1 and B2 sum
to 2, copying the format will not change the formula. But
this formula:

=B1+B2=2

(no dollar signs) will change so that it is now relavent
to the new location.

Hope that helps,
tod



-----Original Message-----
I wish to copy (programmatically) a range that has

conditional
formatting associated with it, and I want the same

conditional
formatting to appear in the destination range. Is there

an easy way
to do this?
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Conditional Formatting -

hi,
it is to my understanding that conditional formats can be
copied and pasted. if you use the copy command and use the
pasteall command, this should carried the conditional
formats with it.

-----Original Message-----
I wish to copy (programmatically) a range that has

conditional
formatting associated with it, and I want the same

conditional
formatting to appear in the destination range. Is there

an easy way
to do this?
.

Reply
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
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Conditional formatting--different formatting depending on cell con Tammy S. Excel Discussion (Misc queries) 3 March 30th 09 08:11 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 11:01 AM.

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

About Us

"It's about Microsoft Excel"