View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben[_2_] Gord Dibben[_2_] is offline
external usenet poster
 
Posts: 621
Default Conditional Formatting and VBA

That is normal.

Excel's Interior.Colorindex does not recognize CF colored backgrounds.

See Chip Pearson's site for info and code to assist with CF coloring.

http://www.cpearson.com/excel/CFColors.htm


Gord

On Thu, 23 Feb 2012 14:50:52 -0800 (PST), Bobby
wrote:

Hi,
I have a sheet with conditional formatting. If the cell contains a
zero then it turns yellow and it works fine. I created a macro to add
all white cells containing a number greater then zero. To do that I
check the Interior.ColorIndex. The funny part is If the cell is yellow
because of the conditional formatting(meaning that the value is zero)
the VBA code with the Interior.ColorIndex sees it has a code 2(white
cell instead of yellow)! Is this normal and how can I fix it?
Thank's ahead.