Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default collapse conditional formatting?

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)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default collapse conditional formatting?

#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
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 Conditional Formatting Icon Sets The Rook[_2_] Excel Discussion (Misc queries) 3 March 7th 09 08:48 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 01:17 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"