• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

What does Conditional Formating really effect

RalphJ

New Member
Does conditional formating change the color index of the cell, if not what does it do? I am trying to count the colored cells of the top 10 numbers in a list that can actually be 10 to 14 numbers.

Thanks

RalphJ
 
RalphJ


Conditional Formatting does nont change the Color Index of a Cell


a simple macro will show you this


Sub Macro1()

For Each c In Range("F4:F6")

MsgBox c.Interior.Color

Next

End sub


Conditional Formatting uses the FormatConditions Object

FormatConditions has an Object of Interior with Color and ColorIndex properties


So the Cell will still have a default color set by the Interior.Color property but this is over-ridden by the FormatConditions Object with its Interior with Color and ColorIndex properties
 
Hi Hui

The above code does show the cell color has not changed. However I am trying to get the Conditional Formatted Color. This color resides at the following.

a variable Rng.FormatConditions.Item 1.Interior.Color ---- etc... The problem is the Item 1 in the formatted conditions I cannot seem to work around it. I have tried Chip Pearsons Conditional Formatting Colors and the functions he has written but they seem to stop when you try to Set the variable to the formatted conditions.


If you have any further ideas I would appreciate it.


Thanks a lot

RalphJ
 
Ralph

Have a look at http://www.cpearson.com/excel/CFColors.htm

It should be able to help you
 
Back
Top