Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All
I have a snippet of code that I've been using to test for the color format of a cell in a particular range and then change the color format of cells in a parallel range based upon the outcome of the test Unfortunately, when I used this code snippet in a recent script my test isn't working Here's the snippet and the result I'm getting For Each c In Worksheets("Factors").Range("RANK" If c.Interior.ColorIndex = 37 Then Worksheets("Factors").Range("FNUM").Cells(counter) .Interior.ColorIndex = 40 'salmo If c.Interior.ColorIndex = 4 Then Worksheets("Factors").Range("FNUM").Cells(counter) .Interior.ColorIndex = 40 'salmo counter = counter + Next I have a watch on the c.Interior.ColorIndex and when it hits the first cell in "RANK" the value becomes -4142 (variant/long). Typically the cell format should be either 37, 4, or no format. Any ideas where the -4142 is coming from Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rephrasing Interior.ColorIndex 36 question. | New Users to Excel | |||
Finding last occurence of Interior.ColorIndex 36 | New Users to Excel | |||
Sumif interior.colorindex condition | Excel Worksheet Functions | |||
interior.colorindex used with conditional formatting | Excel Worksheet Functions | |||
VBA syntax for Font & Interior ColorIndex | Excel Discussion (Misc queries) |