LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 65
Default Can't paste conditional formatting colors into new book?

I have the following code snippet that pastes over a copied range into
a new worksheet. The problem is that conditional formatting in the
first range has set some cell colors, and those colors are not being
transferred over in the copy.

The CF has two conditions; some of the copied cells have met the first
condition only which sets the cell orange, and some both the first and
the second conditions which sets the cell red. The conditions are
based on vlues in cells which do not get copied over.

Any cell which in the original worksheet is either orange or red gets
copied only as orange. Is there anything I can add which copies over
exactly what I see?

Ed

PS - I also have a problem with some of the values which are dates.
Because the action being reported has been completed, an IF formula
has set the date to 0, and zero values are not shown. When the new
workbook pops up to be copied into, though, these blank dates show up
as 1/1/1900. Any remedies?

wk.Activate
wk.Range("A16:J" & y).Select
Set rng = Selection
Set rng = Intersect(rng, rng.SpecialCells(xlCellTypeVisible))
rng.Copy

With wk2
.Activate
.Range("A1").Select
Selection.PasteSpecial Paste:=8
.Range("A1").Select
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
.Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
End With

 
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
Conditional Formatting question with colors Rich Excel Discussion (Misc queries) 4 March 26th 09 05:07 PM
Conditional Formatting - Not all colors work? PSS New Users to Excel 1 April 18th 08 11:49 PM
Conditional Formatting - more than 4 cell colors sharakbh Excel Worksheet Functions 5 March 1st 08 12:09 AM
Conditional Formatting with Colours / Colors [email protected] Excel Worksheet Functions 8 November 18th 06 08:29 PM
Conditional Formatting in 6 colors Sterling Excel Discussion (Misc queries) 1 October 6th 06 11:22 PM


All times are GMT +1. The time now is 08:47 PM.

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"