LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Conditional formatting on a dynamic range - workaround

If you are trying to apply conditional formatting to a dynamic named range, you will find (anyway in Excel 2007) that the result is not what you would expect: In CF, when you enter a range name - say "MyRange" into the "Applies to", Excel will change it to the absolute address. Adding a row to the range will automatically expand the named range, but, CF still applies to the absolute address you entered into the CF range.
Workaround:
Record the conditional format settings to a macro.
In the macro, Excel will first delete previous formatting,
after that it selects the range to apply to: "Range($A$1:$B$18).Select".
Change the absolute address to your range name "Range("MyRange").Select".
Change the formatting commands according to your needs.
Put all formatting steps into the same routine.
Remember to preserve "deleting format" once only, at the very beginning of the routine.

If you have a smarter solution, please share!

Good luck
Håkan
 
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 Problem - Dynamic Formula?? GoBucks[_2_] Excel Worksheet Functions 2 May 3rd 09 04:33 AM
Applying conditional formatting to dynamic range Arup C[_2_] Excel Discussion (Misc queries) 1 October 17th 08 02:10 PM
Dynamic Conditional formatting DS Excel Programming 3 November 7th 07 07:02 PM
Conditional Formatting & Dynamic Range james Excel Worksheet Functions 2 October 11th 05 04:25 PM
Dynamic conditional formatting Chris Excel Programming 1 July 1st 05 06:01 PM


All times are GMT +1. The time now is 02:59 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"