PC Review


Reply
Thread Tools Rate Thread

collapse conditional formatting?

 
 
Marcus =?iso-8859-15?Q?Sch=F6neborn?=
Guest
Posts: n/a
 
      21st Sep 2007
Currently I am using this construct to copy and paste a region so that
it contains no more formulas (the result is to be edited in ways that
would break the formulas, as in deleting some columns and reordering):

source.Copy
dest.PasteSpecial xlPasteColumnWidths
dest.PasteSpecial xlPasteValuesAndNumberFormats
dest.PasteSpecial xlPasteFormats

First question: is it possible to "paste special" all three types at
once?

Second question: xlPasteFormats pastes the conditional formats with
formulas. I want the conditional formats to "collapse" too, that is,
keep the formatting even if the cells are changed.

(Actually, what I have is:

- in A2 and below, there is a cell =IF(B2 < TODAY() - 90, "{old}", "")
- in B2, I set a conditional format to give the cell a red background if
B2 is < TODAY() - 90

However, I consider it unclean and only want the comparison coded in
once, that is, have a conditional format in B2 that checks if A2 is
empty or not, but as I want to delete the column A in the output, this
format would break)
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      21st Sep 2007
#1. I don't think so. You have to do each separately (like you did).
#2. I don't think so. If you know what the conditional formatting rules are,
you could remove the CF and use code to change the formatting following those
rules and formatting specifications.

But if you don't know the rules, you could use Chip Pearson's technique to look
at the CF rules:
http://www.cpearson.com/excel/CFColors.htm

When I want to do this kind of thing (manually--not through code), I'll copy the
range into MSWord and then copy|Paste from there.



Marcus Schöneborn wrote:
>
> Currently I am using this construct to copy and paste a region so that
> it contains no more formulas (the result is to be edited in ways that
> would break the formulas, as in deleting some columns and reordering):
>
> source.Copy
> dest.PasteSpecial xlPasteColumnWidths
> dest.PasteSpecial xlPasteValuesAndNumberFormats
> dest.PasteSpecial xlPasteFormats
>
> First question: is it possible to "paste special" all three types at
> once?
>
> Second question: xlPasteFormats pastes the conditional formats with
> formulas. I want the conditional formats to "collapse" too, that is,
> keep the formatting even if the cells are changed.
>
> (Actually, what I have is:
>
> - in A2 and below, there is a cell =IF(B2 < TODAY() - 90, "{old}", "")
> - in B2, I set a conditional format to give the cell a red background if
> B2 is < TODAY() - 90
>
> However, I consider it unclean and only want the comparison coded in
> once, that is, have a conditional format in B2 that checks if A2 is
> empty or not, but as I want to delete the column A in the output, this
> format would break)


--

Dave Peterson
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting of text effecting formatting of background =?Utf-8?B?SEFI?= Microsoft Access Reports 6 25th Mar 2008 06:23 PM
Conditional Formatting No Longer Conditional in 2007 Beta =?Utf-8?B?Q2FjdHVhci1Oby1KdXRzdQ==?= Microsoft Excel Crashes 0 17th Nov 2006 10:01 PM
How do I do a complex conditional in a conditional formatting formula Ray Stevens Microsoft Excel Discussion 7 12th Mar 2006 10:24 PM
Conditional Formatting that will display conditional data =?Utf-8?B?QnJhaW5GYXJ0?= Microsoft Excel Worksheet Functions 1 13th Sep 2005 05:45 PM
datagrid and border-collapse:collapse style Vaclav Jedlicka Microsoft ASP .NET 1 30th Jun 2003 04:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 PM.