View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Conditional formatting to change ColorIndex?

To check the color index of a conditional format, you have to modify the code
a mite.

Sub whatclr()
MsgBox "ColorIndex number is " & Worksheets(1).Cells(4, 3) _
..FormatConditions(1).Interior.ColorIndex
End Sub

Notice the index number after FormatConditions. It can be one of three
depending on which order it was in the original CF setup.

"J@Y" wrote:

I used conditional format to highlight numbers less than 1. That part works.
The cells containing numbers less than 1 appears to be highlighted, but when
I test its ColorIndex, it still shows -4142, which means its blank. I even
went into FormatCell and the Cell shading section was on None. So what
exactly does Conditional Formatting do to the cell property that changes the
color? Can I get it to change the ColorIndex?