Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default the value of a condition in a conditional format

I use a conditional format to change the interior colour of cells. the
conditional is the same for all the cells to which the conditional
format refers. I'd like to know the displayed colour of a cell to
which the conditional format is applied, from VBA code. the
"background" colour of the cell is available as
<cell.interior.colorindex
the conditional format color is available as
<cell.<conditionalformat(1).interior.colorinde x
but the displayed colour depends on whether
<cell.<conditionalformat(1).formula1
is true or false.

I'd rather not have to write an interpreter for what could be a
general expression.

thanks,
Eric
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default the value of a condition in a conditional format

Not simple, but see http://www.xldynamic.com/source/xld.CFConditions.html

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
...
I use a conditional format to change the interior colour of cells. the
conditional is the same for all the cells to which the conditional
format refers. I'd like to know the displayed colour of a cell to
which the conditional format is applied, from VBA code. the
"background" colour of the cell is available as
<cell.interior.colorindex
the conditional format color is available as
<cell.<conditionalformat(1).interior.colorinde x
but the displayed colour depends on whether
<cell.<conditionalformat(1).formula1
is true or false.

I'd rather not have to write an interpreter for what could be a
general expression.

thanks,
Eric



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default the value of a condition in a conditional format

Bob!

thanks. I found that I could just run through the cells selecting them

....
Cells(i, j).Select
' because I use European separators...
formatCond =
Application.Substitute(Selection.FormatConditions( 1).Formula1, ";",
",")
If Selection.Parent.Evaluate(formatCond) Then
....

to get the right relative positioning for the evaluation of formula1.

Eric

On 9 Jan, 16:17, "Bob Phillips" wrote:
Not simple, but seehttp://www.xldynamic.com/source/xld.CFConditions.html

--
---
HTH

Bob



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
conditional formatting - copy format & remove condition Ladymuck Excel Discussion (Misc queries) 1 March 2nd 10 10:18 AM
Retain Conditional Format When Condition Is No Longer Valid Rob Excel Discussion (Misc queries) 6 December 20th 07 06:26 PM
Conditional Format to highlight entire row if a condition is met klmiura Excel Worksheet Functions 5 November 22nd 07 02:30 PM
use more than 3 condition in conditional format Montu Excel Worksheet Functions 2 November 20th 07 09:51 AM
Conditional Formating. Remove condition, keep format? Mr. Wing Excel Discussion (Misc queries) 0 September 14th 06 07:15 PM


All times are GMT +1. The time now is 05:07 AM.

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"